Skip to content

Update and processing of gmt_data_server.txt is not robust #3723

Closed

Description

@PaulWessel

I've seen these when running the tests in parallel at a time that happens to coincide with the refresh of the data server list. One gets messages like this:

ERROR]: Read error first record in file /home/gia/.gmt/server/gmt_data_server.txt

apparently because that file got clobbered by another process and now it is zero bytes. Because of the short course I have not had time to investigate more but will be looking at flock as we do for gmt.history. Also, when the above situation arises we could take some other action than complain, such as delete and redownload.

Activity

  1. added
    bug
    on Jul 24, 2020
  2. self-assigned this
    on Jul 24, 2020
  3. PaulWessel commented on Jul 26, 2020

    @PaulWessel
    ContributorAuthor

    The current plan is to use flock on a dummy file since I cannot set flock on the file being downloaded. So will try this scheme when we wish to download file A:

    1. Create /tmp/A.download
    2. Get exclusive flock on that file, meaning other files trying to do the same must wait
    3. Do the libcurl download of A
    4. Release the lock and delete the file A.download.

    Will make a branch and simulate this via the schemes listed on this page.

  4. seisman commented on Jul 31, 2020

    @seisman
    Member

    I believe the issue was fixed in #3735.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions