Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exit cod 32 #56

Open
badsmoke opened this issue Dec 3, 2024 · 1 comment
Open

exit cod 32 #56

badsmoke opened this issue Dec 3, 2024 · 1 comment

Comments

@badsmoke
Copy link

badsmoke commented Dec 3, 2024

Hey,

can't do anything with the error, does anyone know where the problem might lie?

ssd: CT120BX500SSD1

smartctl

Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   050    Pre-fail  Always       -       0
  5 Reallocate_NAND_Blk_Cnt 0x0032   100   100   010    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   050    Old_age   Always       -       32867
 12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       14
171 Program_Fail_Count      0x0032   100   100   050    Old_age   Always       -       0
172 Erase_Fail_Count        0x0032   100   100   050    Old_age   Always       -       0
173 Ave_Block-Erase_Count   0x0032   100   100   050    Old_age   Always       -       245
174 Unexpect_Power_Loss_Ct  0x0032   100   100   050    Old_age   Always       -       7
180 Unused_Reserve_NAND_Blk 0x0032   100   100   050    Old_age   Always       -       100
183 SATA_Interfac_Downshift 0x0032   100   100   050    Old_age   Always       -       0
184 Error_Correction_Count  0x0032   100   100   050    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   050    Old_age   Always       -       0
194 Temperature_Celsius     0x0022   059   021   050    Old_age   Always   In_the_past 41 (Min/Max 30/79)
196 Reallocated_Event_Count 0x0032   100   100   050    Old_age   Always       -       0
197 Current_Pending_ECC_Cnt 0x0032   100   100   050    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   100   050    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   100   100   050    Old_age   Always       -       0
202 Percent_Lifetime_Remain 0x0030   084   084   001    Old_age   Offline      -       84
206 Write_Error_Rate        0x002e   100   100   050    Old_age   Always       -       0
210 Success_RAIN_Recov_Cnt  0x0032   100   100   050    Old_age   Always       -       0
246 Total_LBAs_Written      0x0032   100   100   050    Old_age   Always       -       39840328690
247 Host_Program_Page_Count 0x0032   100   100   050    Old_age   Always       -       1245010271
248 FTL_Program_Page_Count  0x0032   100   100   050    Old_age   Always       -       991641600

logs:

WARNING: Command returned exit code 32. Stdout: '{"json_format_version":[1,0],"smartctl":{"version":[7,4],"pre_release":false,"svn_revision":"5530","platform_info":"x86_64-linux-4.15.0-126-generic","build_info":"(local build)","argv":["smartctl","-A","-H","-d","sat","--json=c","/dev/sda"],"drive_database_version":{"string":"7.3/5528"},"exit_status":32},"local_time":{"time_t":1733233576,"asctime":"Tue Dec  3 13:46:16 2024 UTC"},"device":{"name":"/dev/sda","info_name":"/dev/sda [SAT]","type":"sat","protocol":"ATA"},"smart_status":{"passed":true},"ata_smart_attributes":{"revision":1,"table":[{"id":1,"name":"Raw_Read_Error_Rate","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":47,"string":"POSR-K ","prefailure":true,"updated_online":true,"performance":true,"error_rate":true,"event_count":false,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":5,"name":"Reallocate_NAND_Blk_Cnt","value":100,"worst":100,"thresh":10,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":9,"name":"Power_On_Hours","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":34206,"string":"34206"}},{"id":12,"name":"Power_Cycle_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":23,"string":"23"}},{"id":171,"name":"Program_Fail_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":172,"name":"Erase_Fail_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":173,"name":"Ave_Block-Erase_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":240,"string":"240"}},{"id":174,"name":"Unexpect_Power_Loss_Ct","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":9,"string":"9"}},{"id":180,"name":"Unused_Reserve_NAND_Blk","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":100,"string":"100"}},{"id":183,"name":"SATA_Interfac_Downshift","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":184,"name":"Error_Correction_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":187,"name":"Reported_Uncorrect","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":194,"name":"Temperature_Celsius","value":61,"worst":13,"thresh":50,"when_failed":"past","flags":{"value":34,"string":"-O---K ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":false,"auto_keep":true},"raw":{"value":373664251943,"string":"39 (Min/Max 32/87)"}},{"id":196,"name":"Reallocated_Event_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":197,"name":"Current_Pending_ECC_Cnt","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":198,"name":"Offline_Uncorrectable","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":48,"string":"----CK ","prefailure":false,"updated_online":false,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":199,"name":"UDMA_CRC_Error_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":202,"name":"Percent_Lifetime_Remain","value":84,"worst":84,"thresh":1,"when_failed":"","flags":{"value":48,"string":"----CK ","prefailure":false,"updated_online":false,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":84,"string":"84"}},{"id":206,"name":"Write_Error_Rate","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":46,"string":"-OSR-K ","prefailure":false,"updated_online":true,"performance":true,"error_rate":true,"event_count":false,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":210,"name":"Success_RAIN_Recov_Cnt","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":0,"string":"0"}},{"id":246,"name":"Total_LBAs_Written","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":42119032950,"string":"42119032950"}},{"id":247,"name":"Host_Program_Page_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":1316219779,"string":"1316219779"}},{"id":248,"name":"FTL_Program_Page_Count","value":100,"worst":100,"thresh":50,"when_failed":"","flags":{"value":50,"string":"-O--CK ","prefailure":false,"updated_online":true,"performance":false,"error_rate":false,"event_count":true,"auto_keep":true},"raw":{"value":948326400,"string":"948326400"}}]},"power_on_time":{"hours":34206},"power_cycle_count":23,"temperature":{"current":39}}' Stderr: ''

@matusnovak
Copy link
Owner

Hm... Looks like smartctl returns non-zero exit code when it detects that some values are bad.

The return values of smartctl are defined by a bitmask. If all is well with the disk, the return value (exit status) of smartctl is 0 (all bits turned off).
source: https://linux.die.net/man/8/smartctl

Based on the error code 32 your failure would be bit 5 that is:

SMART status check returned "DISK OK" but we found that some (usage or prefail) Attributes have been <= threshold at some time in the past.

We should handle such errors. I am going to make a patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants