bugGNU recutils - Bugs: bug #59414, recdel: error: renaming file...

 
 

bug #59414: recdel: error: renaming file /tmp/recQGt4fb to test.rec

Submitter:  Tru Huynh <tru>
Submitted:  Wed 04 Nov 2020 12:48:08 PM UTC
 
Category:  utilities Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jemarch
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Wed 04 Nov 2020 01:51:00 PM UTC, comment #5: 

thx, confirmed fixed :D
closing ack'ed

Tru
comment #4:

> The fix should be in the pre-release 1.8.90.
>

Tru Huynh <tru>
Wed 04 Nov 2020 01:02:42 PM UTC, comment #4: 

The fix should be in the pre-release 1.8.90.

Jose E. Marchesi <jemarch>
Project Administrator
Wed 04 Nov 2020 12:59:15 PM UTC, comment #3: 

Are you planning to backport to 1.8.xx ? or should I cherry pick the fix? Thanks

Tru

comment #1:

> Hello.  Thanks for the report.
>
> This problem has been already fixed in the git version of recutils.
>

Tru Huynh <tru>
Wed 04 Nov 2020 12:52:31 PM UTC, comment #2: 

When moving the $CWD to /tmp, it is working fine.
No issue either if I set TMPDIR to $CWD.

thanks

Tru

Tru Huynh <tru>
Wed 04 Nov 2020 12:51:59 PM UTC, comment #1: 

Hello.  Thanks for the report.

This problem has been already fixed in the git version of recutils.

Jose E. Marchesi <jemarch>
Project Administrator
Wed 04 Nov 2020 12:48:08 PM UTC, original submission:  

when /tmp is not on the same filesystem as the current directory, recdel fails when trying to rename the temporary file.

[tru@sillage tru]$ cat test.rec
id: 0
label: test 0

id: 1
label: test 1

id: 3
label: test 3
[tru@sillage tru]$ recdel  -e ' id = 1 ' test.rec
recdel: error: renaming file /tmp/recWINvBP to test.rec

strace -f yields:
...
stat("test.rec", {st_mode=S_IFREG|0644, st_size=62, ...}) = 0
geteuid()                               = 2765
getegid()                               = 400
getuid()                                = 2765
getgid()                                = 400
access("test.rec", W_OK)                = 0
stat("test.rec", {st_mode=S_IFREG|0644, st_size=62, ...}) = 0
stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
open("/tmp/recMtcq67", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
fcntl(4, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efbf7ffa000
write(4, "id: 0\nlabel: test 0\n\nid: 3\nlabel"..., 41) = 41
close(4)                                = 0
munmap(0x7efbf7ffa000, 4096)            = 0
rename("/tmp/recMtcq67", "test.rec")    = -1 EXDEV (Invalid cross-device link)
unlink("/tmp/recMtcq67")                = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=2502, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efbf7ffa000
read(4, "# Locale name alias data base.\n#"..., 4096) = 2502
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x7efbf7ffa000, 4096)            = 0
open("/c7/shared/recutils/1.8/share/locale/en_US.UTF-8/LC_MESSAGES/recutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/c7/shared/recutils/1.8/share/locale/en_US.utf8/LC_MESSAGES/recutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/c7/shared/recutils/1.8/share/locale/en_US/LC_MESSAGES/recutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/c7/shared/recutils/1.8/share/locale/en.UTF-8/LC_MESSAGES/recutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/c7/shared/recutils/1.8/share/locale/en.utf8/LC_MESSAGES/recutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/c7/shared/recutils/1.8/share/locale/en/LC_MESSAGES/recutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "recdel", 6recdel)                   = 6
write(2, ": error: ", 9: error: )                = 9
write(2, "renaming file /tmp/recMtcq67 to "..., 41renaming file /tmp/recMtcq67 to test.rec
) = 41
close(1)                                = 0
close(2)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++

[tru@sillage tru]$ df -hTP . /tmp
Filesystem                            Type  Size  Used  Avail  Use%  Mounted       on
valerian.bis.pasteur.fr:/c7/home/tru  nfs4  362G  335G  27G    93%   /c7/home/tru
/dev/mapper/vgbis-root                xfs   32G   18G   14G    58%   /

Tru Huynh <tru>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jemarch (Posted a comment)
  • -email is unavailable- added by tru (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-04 jemarch StatusNone Fixed
        Assigned toNone jemarch
        Open/ClosedOpen Closed

    Back to the top


    Powered by Savane 3.9