indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
153 stars 70 forks source link

"Bad File Descriptor" when Indigo can't write to directory because of permissions #415

Closed ckuethe closed 3 years ago

ckuethe commented 3 years ago

Is "Bad File Descriptor" the right error? indigo (uid=1001 on this machine) clearly doesn't have permission to write to /root (uid=0). I didn't check to see what happens if I try to write to a nonexistent server path, eg. /home/indigo/images/2021-11-13/orion_nebula

indigo_server: indigo_ccd_asi[asi_set_cooler:414]: ASIGetControlValue(0, ASI_TEMPERATURE) = 0
indigo_server: INDIGO Bus: property update
indigo_server: 'Server'.'LOG_LEVEL' SWITCH rw Ok 2.0 0 (null) {
indigo_server:   'ERROR' = Off
indigo_server:   'INFO' = Off
indigo_server:   'DEBUG' = Off
indigo_server:   'TRACE' = On
indigo_server: }
indigo_server: 15 ← <setSwitchVector device='Server' name='LOG_LEVEL' state='Ok'>
indigo_server: 15 ← <oneSwitch name='ERROR'>Off</oneSwitch>
indigo_server: 15 ← <oneSwitch name='INFO'>Off</oneSwitch>
indigo_server: 15 ← <oneSwitch name='DEBUG'>Off</oneSwitch>
indigo_server: 15 ← <oneSwitch name='TRACE'>On</oneSwitch>
indigo_server: 15 ← </setSwitchVector>
indigo_server: 16 ← <setSwitchVector device='Server' name='LOG_LEVEL' state='Ok'>
indigo_server: 16 ← <oneSwitch name='ERROR'>Off</oneSwitch>
indigo_server: 16 ← <oneSwitch name='INFO'>Off</oneSwitch>
indigo_server: 16 ← <oneSwitch name='DEBUG'>Off</oneSwitch>
indigo_server: 16 ← <oneSwitch name='TRACE'>On</oneSwitch>
indigo_server: 16 ← </setSwitchVector>
indigo_server: 8 ← <setSwitchVector device='Server' name='LOG_LEVEL' state='Ok'>
indigo_server: 8 ← <oneSwitch name='ERROR'>Off</oneSwitch>
indigo_server: 8 ← <oneSwitch name='INFO'>Off</oneSwitch>
indigo_server: 8 ← <oneSwitch name='DEBUG'>Off</oneSwitch>
indigo_server: 8 ← <oneSwitch name='TRACE'>On</oneSwitch>
indigo_server: 8 ← </setSwitchVector>
indigo_server: timer callback: 0xb4563188 started
indigo_server: indigo_ccd_asi[asi_set_cooler:414]: ASIGetControlValue(0, ASI_TEMPERATURE) = 0
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_TEMPERATURE' NUMBER ro Ok 2.0 0 (null) {
indigo_server:   'TEMPERATURE' = 14.6
indigo_server: }
indigo_server: 15 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 15 ← <oneNumber name='TEMPERATURE'>14.6</oneNumber>
indigo_server: 15 ← </setNumberVector>
indigo_server: 16 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 16 ← <oneNumber name='TEMPERATURE'>14.6</oneNumber>
indigo_server: 16 ← </setNumberVector>
indigo_server: 8 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 8 ← <oneNumber name='TEMPERATURE'>14.6</oneNumber>
indigo_server: 8 ← </setNumberVector>
indigo_server: timer callback: 0xb4563188 finished
indigo_server: timer #5 (of 7) used for 5s
indigo_server: timer callback: 0xb4563188 started
indigo_server: indigo_ccd_asi[asi_set_cooler:414]: ASIGetControlValue(0, ASI_TEMPERATURE) = 0
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_TEMPERATURE' NUMBER ro Ok 2.0 0 (null) {
indigo_server:   'TEMPERATURE' = 14.6
indigo_server: }
indigo_server: 15 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 15 ← <oneNumber name='TEMPERATURE'>14.6</oneNumber>
indigo_server: 15 ← </setNumberVector>
indigo_server: 16 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 16 ← <oneNumber name='TEMPERATURE'>14.6</oneNumber>
indigo_server: 16 ← </setNumberVector>
indigo_server: 8 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 8 ← <oneNumber name='TEMPERATURE'>14.6</oneNumber>
indigo_server: 8 ← </setNumberVector>
indigo_server: timer callback: 0xb4563188 finished
indigo_server: timer #5 (of 7) used for 5s
indigo_server: 16 → <newNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE'>
indigo_server: 16 → <oneNumber name='EXPOSURE'>2</oneNumber>
indigo_server: </newNumberVector>
indigo_server: INDIGO Bus: property change request
indigo_server: 'ZWO ASI482MC #0'.'CCD_EXPOSURE' NUMBER UNDEFINED Idle 0.0 0 (null) {
indigo_server:   'EXPOSURE' = 2
indigo_server: }
indigo_server: INDIGO Bus: Change request - Device 'ZWO ASI482MC #0' token 0x0, Proprerty '(null)' token 0xb279f838
indigo_server: indigo_ccd_asi[asi_start_exposure:351]: ASIStartExposure(0) = 0
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_EXPOSURE' NUMBER rw Busy 2.0 0 (null) {
indigo_server:   'EXPOSURE' = 2
indigo_server: }
indigo_server: 15 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 15 ← <oneNumber name='EXPOSURE' target='2'>2</oneNumber>
indigo_server: 15 ← </setNumberVector>
indigo_server: 16 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 16 ← <oneNumber name='EXPOSURE' target='2'>2</oneNumber>
indigo_server: 16 ← </setNumberVector>
indigo_server: 8 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 8 ← <oneNumber name='EXPOSURE' target='2'>2</oneNumber>
indigo_server: 8 ← </setNumberVector>
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_IMAGE_FILE' TEXT ro Busy 2.0 0 (null) {
indigo_server:   'FILE' = '/root/DARK_001.fits'
indigo_server: }
indigo_server: 15 ← <setTextVector device='ZWO ASI482MC #0' name='CCD_IMAGE_FILE' state='Busy'>
indigo_server: 15 ← <oneText name='FILE'>/root/DARK_001.fits</oneText>
indigo_server: 15 ← </setTextVector>
indigo_server: 16 ← <setTextVector device='ZWO ASI482MC #0' name='CCD_IMAGE_FILE' state='Busy'>
indigo_server: 16 ← <oneText name='FILE'>/root/DARK_001.fits</oneText>
indigo_server: 16 ← </setTextVector>
indigo_server: 8 ← <setTextVector device='ZWO ASI482MC #0' name='CCD_IMAGE_FILE' state='Busy'>
indigo_server: 8 ← <oneText name='FILE'>/root/DARK_001.fits</oneText>
indigo_server: 8 ← </setTextVector>
indigo_server: timer #2 (of 7) used for 1s
indigo_server: timer #6 (of 7) used for 2s
indigo_server: timer callback: 0xb5e88e6c started
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_EXPOSURE' NUMBER rw Busy 2.0 0 (null) {
indigo_server:   'EXPOSURE' = 1
indigo_server: }
indigo_server: 15 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 15 ← <oneNumber name='EXPOSURE' target='2'>1</oneNumber>
indigo_server: 15 ← </setNumberVector>
indigo_server: 16 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 16 ← <oneNumber name='EXPOSURE' target='2'>1</oneNumber>
indigo_server: 16 ← </setNumberVector>
indigo_server: 8 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 8 ← <oneNumber name='EXPOSURE' target='2'>1</oneNumber>
indigo_server: 8 ← </setNumberVector>
indigo_server: timer callback: 0xb5e88e6c finished
indigo_server: timer #2 (of 7) used for 1s
indigo_server: timer callback: 0xb4563188 started
indigo_server: timer callback: 0xb4563188 finished
indigo_server: timer #5 (of 7) used for 5s
indigo_server: timer callback: 0xb456467c started
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_EXPOSURE' NUMBER rw Busy 2.0 0 (null) {
indigo_server:   'EXPOSURE' = 0
indigo_server: }
indigo_server: 15 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 15 ← <oneNumber name='EXPOSURE' target='2'>0</oneNumber>
indigo_server: 15 ← </setNumberVector>
indigo_server: 16 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 16 ← <oneNumber name='EXPOSURE' target='2'>0</oneNumber>
indigo_server: 16 ← </setNumberVector>
indigo_server: 8 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Busy'>
indigo_server: 8 ← <oneNumber name='EXPOSURE' target='2'>0</oneNumber>
indigo_server: 8 ← </setNumberVector>
indigo_server: timer callback: 0xb5e88e6c started
indigo_server: timer callback: 0xb5e88e6c finished
indigo_server: timer #2 done
indigo_server: indigo_ccd_asi[asi_read_pixels:376]: ASIGetDataAfterExp(0) = 0
indigo_server: RAW to FITS conversion in 0.037091s
indigo_server: indigo_write(): Bad file descriptor
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_IMAGE_FILE' TEXT ro Alert 2.0 0 (null) {
indigo_server:   'FILE' = '/root/DARK_001.fits'
indigo_server: }
indigo_server: 15 ← <setTextVector device='ZWO ASI482MC #0' name='CCD_IMAGE_FILE' state='Alert' message='Bad file descriptor'>
indigo_server: 15 ← <oneText name='FILE'>/root/DARK_001.fits</oneText>
indigo_server: 15 ← </setTextVector>
indigo_server: 16 ← <setTextVector device='ZWO ASI482MC #0' name='CCD_IMAGE_FILE' state='Alert' message='Bad file descriptor'>
indigo_server: 16 ← <oneText name='FILE'>/root/DARK_001.fits</oneText>
indigo_server: 16 ← </setTextVector>
indigo_server: 8 ← <setTextVector device='ZWO ASI482MC #0' name='CCD_IMAGE_FILE' state='Alert' message='Bad file descriptor'>
indigo_server: 8 ← <oneText name='FILE'>/root/DARK_001.fits</oneText>
indigo_server: 8 ← </setTextVector>
indigo_server: Local save in 0.039816s
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_EXPOSURE' NUMBER rw Ok 2.0 0 (null) {
indigo_server:   'EXPOSURE' = 0
indigo_server: }
indigo_server: 15 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Ok'>
indigo_server: 15 ← <oneNumber name='EXPOSURE' target='2'>0</oneNumber>
indigo_server: 15 ← </setNumberVector>
indigo_server: 16 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Ok'>
indigo_server: 16 ← <oneNumber name='EXPOSURE' target='2'>0</oneNumber>
indigo_server: 16 ← </setNumberVector>
indigo_server: 8 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_EXPOSURE' state='Ok'>
indigo_server: 8 ← <oneNumber name='EXPOSURE' target='2'>0</oneNumber>
indigo_server: 8 ← </setNumberVector>
indigo_server: timer callback: 0xb456467c finished
indigo_server: timer #6 done
indigo_server: timer callback: 0xb4563188 started
indigo_server: indigo_ccd_asi[asi_set_cooler:414]: ASIGetControlValue(0, ASI_TEMPERATURE) = 0
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_TEMPERATURE' NUMBER ro Ok 2.0 0 (null) {
indigo_server:   'TEMPERATURE' = 14.9
indigo_server: }
indigo_server: 15 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 15 ← <oneNumber name='TEMPERATURE'>14.9</oneNumber>
indigo_server: 15 ← </setNumberVector>
indigo_server: 16 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 16 ← <oneNumber name='TEMPERATURE'>14.9</oneNumber>
indigo_server: 16 ← </setNumberVector>
indigo_server: 8 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 8 ← <oneNumber name='TEMPERATURE'>14.9</oneNumber>
indigo_server: 8 ← </setNumberVector>
indigo_server: timer callback: 0xb4563188 finished
indigo_server: timer #5 (of 7) used for 5s
indigo_server: timer callback: 0xb4563188 started
indigo_server: indigo_ccd_asi[asi_set_cooler:414]: ASIGetControlValue(0, ASI_TEMPERATURE) = 0
indigo_server: INDIGO Bus: property update
indigo_server: 'ZWO ASI482MC #0'.'CCD_TEMPERATURE' NUMBER ro Ok 2.0 0 (null) {
indigo_server:   'TEMPERATURE' = 14.8
indigo_server: }
indigo_server: 15 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 15 ← <oneNumber name='TEMPERATURE'>14.8</oneNumber>
indigo_server: 15 ← </setNumberVector>
indigo_server: 16 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 16 ← <oneNumber name='TEMPERATURE'>14.8</oneNumber>
indigo_server: 16 ← </setNumberVector>
indigo_server: 8 ← <setNumberVector device='ZWO ASI482MC #0' name='CCD_TEMPERATURE' state='Ok'>
indigo_server: 8 ← <oneNumber name='TEMPERATURE'>14.8</oneNumber>
indigo_server: 8 ← </setNumberVector>
indigo_server: timer callback: 0xb4563188 finished
indigo_server: timer #5 (of 7) used for 5s
indigo_server: 16 → <newSwitchVector device='Server' name='LOG_LEVEL'>
indigo_server: 16 → <oneSwitch name='ERROR'>Off</oneSwitch>
indigo_server: <oneSwitch name='INFO'>Off</oneSwitch>
indigo_server: <oneSwitch name='DEBUG'>On</oneSwitch>
indigo_server: <oneSwitch name='TRACE'>Off</oneSwitch>
indigo_server: </newSwitchVector>
indigo_server: INDIGO Bus: property change request
indigo_server: 'Server'.'LOG_LEVEL' SWITCH UNDEFINED Idle 0.0 0 (null) {
indigo_server:   'ERROR' = Off
indigo_server:   'INFO' = Off
indigo_server:   'DEBUG' = On
indigo_server:   'TRACE' = Off
indigo_server: }
indigo_server: INDIGO Bus: Change request - Device 'Server' token 0x0, Proprerty '(null)' token 0xb279f838
indigo_server: indigo_ccd_asi[asi_set_cooler:414]: ASIGetControlValue(0, ASI_TEMPERATURE) = 0
rumengb commented 3 years ago

Fixed with commit a3c5f421b842802ae62ff77ef989ad4af620dfff The fix will be available in the next indigo release.