Opened 3 weeks ago

Last modified 3 weeks ago

#1989 new defect

drivedb.h update (April 2026) causes smartd crash with WD20EFRX

Reported by: sarp_03 Owned by:
Priority: critical Milestone: undecided
Component: all Version: 7.4
Keywords: Cc:

Description

After automatic drivedb.h update on April 12 2026, smartd crashes
immediately when monitoring a WD Red Plus (WD20EFRX-68EUZN0).

Error message: malloc(): unaligned tcache chunk detected

Drive details:

  • Model: WDC WD20EFRX-68EUZN0
  • Firmware: 82.00A82
  • WWN: 5-0014ee-26338ef76

Environment:

  • smartd version: 7.4 2023-08-01 r5530
  • OS: TrueNAS 25.04.2.6 (Linux 6.12.15)

Steps to reproduce:

  1. Install WD20EFRX-68EUZN0
  2. Use drivedb.h dated April 12 2026
  3. Start smartd with this drive configured
  4. smartd crashes immediately after identifying the drive

Workarounds that fix the issue:

  • Roll back to drivedb.h dated March 1 2026 -> works
  • Use -P ignore directive in smartd.conf -> works

The March 1 drivedb.h works perfectly with the same drive and
same smartd binary, confirming the bug is in the April 12 drivedb.h.

Change History (3)

in reply to:  description comment:1 by Christian Franke, 3 weeks ago

Component: drivedball
Milestone: undecided
Priority: minorcritical

Thanks for reporting this. There was no similar report until now.

It is unlikely that the bug is in drivedb.h itself. The update may have changed the memory access pattern which triggers some memory corruption bug in smartmontools or the C/C++ runtime libraries.

Error message: malloc(): unaligned tcache chunk detected

  • Model: WDC WD20EFRX-68EUZN0
  • Firmware: 82.00A82

Please provide the outputs of:

smartd -q onecheck
smartctl -r ioctl,2 -i THIS_WDC_DEVICE
smartctl -P showall 'WDC WD20EFRX-68EUZN0'
smartctl -P showall 'WDC WD20EFRX-68EUZN0' '82.00A82'
  • smartd version: 7.4 2023-08-01 r5530
  • OS: TrueNAS 25.04.2.6 (Linux 6.12.15)

Is this the official TrueNAS smartmontools package?

Do other TrueNAS users also report this problem?

Which C++ toolchain (g++ or clang++?) was used to build?

Was _FORTIFY_SOURCE=2 or ...=3 enabled and effective during build?

Was Link Time Optimization (LTO, -flto) enabled during build?

The March 1 drivedb.h works perfectly with the same drive and
same smartd binary, confirming the bug is in the April 12 drivedb.h.

There were no March 1 or April 12 versions:
https://sourceforge.net/p/smartmontools/code/5736/log/?path=/branches/RELEASE_7_3_DRIVEDB/smartmontools

Please provide the "VERSION: ..." strings and some checksum (MD5, SHA1, ...) of both versions.

The related drivedb entry Western Digital Red Plus did not change this year. The last (comment only) change was [3b5180dd3290].

Which command line (update-smart-drivedb ... or other command?) was used for the update?

comment:2 by sarp_03, 3 weeks ago

Thank you for the detailed questions. Here are all requested outputs and answers.

---

smartd -q onecheck output:

Note: This output was recorded after restoring the working drivedb.h. The crash only occurred with the broken version. I no longer have the broken drivedb.h file available.

smartd 7.4 2023-08-01 r5530 [x86_64-linux-6.12.15-production+truenas] (local build)
Device: /dev/sdb [SAT], WDC WD20EFRX-68EUZN0, found in smartd database 7.3/6131: Western Digital Red Plus
Started with '-q onecheck' option. All devices successfully checked once.
smartd is exiting (exit status 0)

---

smartctl -r ioctl,2 -i /dev/sdb output:

Device Model: WDC WD20EFRX-68EUZN0
Serial Number: WD-WCC4M6LA1HYA
LU WWN Device Id: 5 0014ee 26338ef76
Firmware Version: 82.00A82
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database 7.3/6131
ATA Version is: ACS-2
SATA Version is: SATA 3.0, 6.0 Gb/s

---

smartctl -P showall 'WDC WD20EFRX-68EUZN0' and smartctl -P showall 'WDC WD20EFRX-68EUZN0' '82.00A82':

Both commands match the same entry:

MODEL REGEXP: WDC WD(10JFCX|[1-6]0EFRX|[2-8]0EFPX|[23468]0E[FZ](ZX|ZZ)|(80|10[01]|1[24]0|1[68]1)(JFC|EF[ABFRG])X)-.*
FIRMWARE REGEXP: .*
MODEL FAMILY: Western Digital Red Plus
ATTRIBUTE OPTIONS: None preset

---

VERSION strings and checksums:

Working version (drivedb.h.old):

VERSION: 7.3/6088 2026-02-09 15:31:35 +0000 0e29a834e52d
MD5: 478ff3baf281ab3d9cec428071655704

Crashing version (drivedb.h.broken, no longer available):

VERSION: 7.3/6114 2026-03-14 16:43:06 +0000 ea5c2a0fd343
MD5: 4eee5c484fea0ec3b397c42cd99ad730

The dates "March 1" and "April 12" in my original report were CRON execution timestamps, not internal drivedb.h version dates. I apologize for the inaccuracy.

---

Update method:

Automatic weekly CRON job running update-smart-drivedb (every Saturday at 00:00). The binary is no longer in PATH on this TrueNAS system; it was invoked by TrueNAS's own smartmontools integration.

---

Official TrueNAS package / compiler flags:

Yes, this is the TrueNAS-provided smartmontools package. The binary identifies itself as (local build). I do not have access to build configuration details (compiler, _FORTIFY_SOURCE, or LTO flags).

---

Other TrueNAS users:

I am not aware of other reports so far.

in reply to:  2 comment:3 by Christian Franke, 3 weeks ago

Thanks for detailed answer. The outputs look as expected except that smartctl -r ioctl,2 -i /dev/sdb lacks the debug output. But the outputs do not help much because the broken file was not involved.

Crashing version (drivedb.h.broken, no longer available):

VERSION: 7.3/6114 2026-03-14 16:43:06 +0000 ea5c2a0fd343
MD5: 4eee5c484fea0ec3b397c42cd99ad730

Both VERSION and MD5 are correct. Please restore this (no longer current) version from ...

https://svn.code.sf.net/p/smartmontools/code/branches/RELEASE_7_3_DRIVEDB/smartmontools/drivedb.h?p=5735

... and/or ...

https://raw.githubusercontent.com/smartmontools/smartmontools/19f70454f45a/smartmontools/drivedb.h

... verify the MD5 checksum, repeat the requested tests and check whether smartd crashes again.


PS: Please use plain-text attachments or wiki markup for sample outputs.

Note: See TracTickets for help on using tickets.