You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the main exiftool python process is killed abruptly (SEGFAULT or kill -9), the perl process started for exiftool keeps running (see screenshots). I am not sure if it is an exiftool bug or an osxphotos bug: when the osxphotos process is killed, the perl process should receive a signal (SIGPIPE, if I remember my college Unix courses correctly), and exit by itself...
To Reproduce
Run osxphotos export with the --exiftool argument (see below the full command line used if needed)
kill -9 {osxphotos pid}
a ps shows a perl process still running (see screenshot)
Expected behavior
The perl process should exit or be killed
Screenshots
Command line used:
$ osxphotos export osxphotos --retry 3 --update --report export_all_report-`date +%Y-%m-%d-%H%M%S`.json \ --cleanup --query-eval "list(filter(re.compile(r'^(19|20)').match, [item for sublist in [a.folder_names for a in photo.album_info] for item in sublist]))" \ --convert-to-jpeg --jpeg-quality 0.95 --directory "{folder_album,NoAlbum}" --person-keyword --keyword-template "{label}" \ --skip-original-if-edited --exiftool --filename "{created.strftime,%Y-%m-%d-%H%M%S}-{exiftool:EXIF:SubSecTimeOriginal,000}" \ --jpeg-ext jpg --description-template "{descr}{detected_text? - {detected_text},}" --timestamp -V -V
Lingering perl processes after 3 SEGFAULTS and one kill -9:
Note: The segfaults I mention were due to a faulty python installation, it is not a bug in osxphotos. Upgrading python with homebrew fixed the issue....
Desktop (please complete the following information):
osxphotos --versionosxphotos, version 0.68.2Python 3.12.4 (main, Jun 6 2024, 18:26:44) [Clang 15.0.0 (clang-1500.3.9.4)]macOS 14.5.0, arm64
The text was updated successfully, but these errors were encountered:
I'm not sure if this is something I can fix but will take a look at the python subprocess module to see if I'm missing something. When exiftool is first called, a persistent exiftool process is started in a subprocess and the osxphotos python code then communicates with this process to run the exiftool commands. This prevents having to start a new exiftool process for every photo. There is tear-down code that will kill any lingering exiftool processes at shutdown but of course, this doesn't get called if you kill the python process or it segfaults.
Describe the bug
When the main exiftool python process is killed abruptly (SEGFAULT or kill -9), the perl process started for exiftool keeps running (see screenshots). I am not sure if it is an exiftool bug or an osxphotos bug: when the osxphotos process is killed, the perl process should receive a signal (SIGPIPE, if I remember my college Unix courses correctly), and exit by itself...
To Reproduce
osxphotos export
with the--exiftool
argument (see below the full command line used if needed)Expected behavior
The perl process should exit or be killed
Screenshots
Command line used:
Lingering perl processes after 3 SEGFAULTS and one
kill -9
:Note: The segfaults I mention were due to a faulty python installation, it is not a bug in osxphotos. Upgrading python with homebrew fixed the issue....
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: