osxphotos
osxphotos copied to clipboard
exiftool perl process keeps running after a critical error in the python process (SEGFAULT or kill -9)
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
- 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
:
$ ps auxw | grep perl
fgarzon 82103 0.1 0.0 411755632 992 s000 S Sun07PM 14:53.28 /usr/bin/perl5.30 -w /opt/homebrew/bin/exiftool -stay_open True -api largefilesupport=1 -@ - -common_args -n -P -G -E
fgarzon 84911 0.1 0.0 411780896 976 s000 S Sun09PM 12:28.47 /usr/bin/perl5.30 -w /opt/homebrew/bin/exiftool -stay_open True -api largefilesupport=1 -@ - -common_args -n -P -G -E
fgarzon 42827 0.1 0.8 411899840 131040 s000 S 10:09PM 6:57.88 /usr/bin/perl5.34 -w /opt/homebrew/bin/exiftool -stay_open True -api largefilesupport=1 -@ - -common_args -n -P -G -E
fgarzon 79241 0.1 0.0 411771136 992 s000 S Sun06PM 14:10.09 /usr/bin/perl5.30 -w /opt/homebrew/bin/exiftool -stay_open True -api largefilesupport=1 -@ - -common_args -n -P -G -E
fgarzon 43708 0.0 0.0 410592976 1328 s003 S+ 10:31PM 0:00.00 grep perl
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 --version
osxphotos, version 0.68.2
Python 3.12.4 (main, Jun 6 2024, 18:26:44) [Clang 15.0.0 (clang-1500.3.9.4)]
macOS 14.5.0, arm64