Tagging deletes image-clueless

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Tagging deletes image-clueless

ARKPhot
Hmm, strace shows 7610 (which is the process number?) unlinking the file (IMG_5858.JPG) then there's a rename to "IMG_5858.JPG7593" and another unlink...or whatever. Anybody able to explain what this might mean?

AND I tried to force writing to sidecar files, which works flawlessly, so at least there's a workaround. I'd like to know what's the problem anyhow.
For the sake of my tagging problem though, the issue might be marked as solved.

Thanks to all involved (and still I'd like to know what the problem is)



7610  stat("/home/arne/Bilder/2014-04/2014-05-03/jpg/IMG_5858.JPG",  <unfinished ...>
7593  recvfrom(14,  <unfinished ...>
7610  <... stat resumed> {st_mode=S_IFREG|0664, st_size=2405624, ...}) = 0
7593  <... recvfrom resumed> 0x2ce5ca4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
7610  unlink("/home/arne/Bilder/2014-04/2014-05-03/jpg/IMG_5858.JPG" <unfinished ...>
7593  poll([{fd=11, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=14, events=POLLIN}, {fd=18, events=POLLIN}, {fd=20, events=POLLPRI}, {fd=21, events=POLLIN}, {fd=25, events=POLLIN}, {fd=26, events=POLLIN}, {fd=58, events=POLLIN}, {fd=59, events=POLLIN}, {fd=57, events=POLLIN}, {fd=56, events=POLLIN}, {fd=31, events=POLLIN}, {fd=63, events=POLLIN}, {fd=61, events=POLLIN}, {fd=60, events=POLLIN}, {fd=54, events=POLLIN}], 18, 106) = 1 ([{fd=58, revents=POLLIN}])
7593  recvfrom(14, 0x2ce5ca4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
7593  read(58, "G\1\0\0\10\0\0\0\0\0\0\0\20\0\0\0IMG_5858.JPG\0\0\0\0"..., 16400) = 64
7593  write(2, "digikam(7593)/digikam (core) Dig"..., 158) = 158
7593  write(2, "digikam(7593)/digikam (core) Dig"..., 158) = 158
7593  recvfrom(14, 0x2ce5ca4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
7593  poll([{fd=11, events=POLLIN}, {fd=15, events=POLLIN}, {fd=16, events=POLLIN}, {fd=14, events=POLLIN}, {fd=18, events=POLLIN}, {fd=20, events=POLLPRI}, {fd=21, events=POLLIN}, {fd=25, events=POLLIN}, {fd=26, events=POLLIN}, {fd=58, events=POLLIN}, {fd=59, events=POLLIN}, {fd=57, events=POLLIN}, {fd=56, events=POLLIN}, {fd=31, events=POLLIN}, {fd=63, events=POLLIN}, {fd=61, events=POLLIN}, {fd=60, events=POLLIN}, {fd=54, events=POLLIN}], 18, 105 <unfinished ...>
7610  <... unlink resumed> )            = 0
7610  rename("/home/arne/Bilder/2014-04/2014-05-03/jpg/IMG_5858.JPG7593", "/home/arne/Bilder/2014-04/2014-05-03/jpg/IMG_5858.JPG") = 0
7610  unlink("/home/arne/Bilder/2014-04/2014-05-03/jpg/IMG_5858.JPG7593") = -1 ENOENT (No such file or directory)
7610  stat("/home/arne/Bilder/2014-04/2014-05-03/jpg/IMG_5858.JPG", {st_mode=S_IFREG|0664, st_size=2407755, ...}) = 0
7610  utime("/home/arne/Bilder/2014-04/2014-05-03/jpg/IMG_5858.JPG", [2014/05/03-15:23:52, 2014/05/03-15:23:52] <unfinished ...>
7593  <... poll resumed> )              = 1 ([{fd=58, revents=POLLIN}])
7610  <... utime resumed> )             = 0
7610  write(2, "digikam(7593)/KEXIV2 KExiv2Iface"..., 98 <unfinished ...>
7593  recvfrom(14, 0x2ce5ca4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
7593  read(58, "G\1\0\0@\0\0\0\321\6\0\0 \0\0\0IMG_5858.JPG7593"..., 16400) = 80
7593  futex(0x36217baa00, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
7610  <... write resumed> )             = 98
7610  futex(0x36217baa00, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>

Reply | Threaded
Open this post in threaded view
|

Re: Tagging deletes image-clueless

Andrew Goodbody
On 04/05/14 20:23, ARKPhot wrote:
> Hmm, strace shows 7610 (which is the process number?) unlinking the file
> (IMG_5858.JPG) then there's a rename to "IMG_5858.JPG7593" and another
> unlink...or whatever. Anybody able to explain what this might mean?

This is all normal and is not your problem.
1) temporary file is created earlier in the process and changes are
applied to this file.
2) original file is deleted - first unlink seen in log snippet.
3) temporary file is renamed to original filename ie the rename is from
IMG_5858.JPG7593 not to.

The 2nd unlink (of the temporary filename) fails due to the rename
having succeeded (=0) so at the end of that log snippet, IMG_5858.JPG
exists and has the changed data in it.

This is the standard way you update a file safely - copy to temp file
and make changes to it, delete old file, rename temp to original. None
of these operations should result in data loss even if the machine loses
power in the middle of an operation.

Andrew
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
12