[smartmontools-support] smartctl bug report

j2spring j2spring at gmail.com
Sat Aug 23 03:18:38 CEST 2025


I have two NVMe . One encounters errors when using version 7.4, while the
other encounters errors when using version 7.5.

But no matter it's version 7.4 or 7.5, just adding one line of code can
solve the problem. I don't know why.

// Main program
int main(int argc, char **argv)
{
*    pout(" ");  //fix bug*

  int status;
  bool badcode = false;
....................


=====================================7.4=====================================
*smartctl -j -a /dev/nvme0*
{
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      4
    ],
    "pre_release": false,
    "svn_revision": "5530",
    "platform_info": "x86_64-linux-6.8.0-71-generic",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-j",
      "-a",
      "/dev/nvme0"
    ],
    "exit_status": 8
  },
  "local_time": {
    "time_t": 1755910276,
    "asctime": "Sat Aug 23 08:51:16 2025 CST"
  },
  "device": {
    Smartctl: Exception: json.cpp(535): Assertion failed: is_obj ==
!p2->key.empty()
Please inform smartmontools-support at listi.jpberlin.de, including output of
smartctl -V.
free(): invalid pointer
Aborted (core dumped)


*smartctl -V -j -a /dev/nvme0*
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-71-generic] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

smartctl comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
the terms of the GNU General Public License; either
version 2, or (at your option) any later version.
See https://www.gnu.org for further details.

smartmontools release 7.4 dated 2023-08-01 at 10:59:45 UTC
smartmontools SVN rev 5530 dated 2023-08-01 at 11:00:21
smartmontools build host: x86_64-pc-linux-gnu
smartmontools build with: C++11, GCC 13.2.0
smartmontools configure arguments: [hidden in reproducible builds]
reproducible build SOURCE_DATE_EPOCH: 1712593173 (2024-04-09 00:19:33)



=====================================7.5=====================================
./smartctl -j -a /dev/nvme1
Fatal glibc error: malloc.c:2599 (sysmalloc): assertion failed: (old_top ==
initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >=
MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize -
1)) == 0)
Aborted (core dumped)

smartctl 7.5 2025-04-30 r5714 [x86_64-linux-6.8.0-71-generic] (local build)
Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org

smartctl comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
the terms of the GNU General Public License; either
version 2, or (at your option) any later version.
See https://www.gnu.org for further details.

smartmontools release 7.5 dated 2025-04-30 at 07:42:55 UTC
smartmontools SVN rev 5714 dated 2025-04-30 at 07:43:44
smartmontools build host: x86_64-pc-linux-gnu
smartmontools build with: C++11, GCC 13.3.0
smartmontools configure arguments: [no arguments given]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://listi.jpberlin.de/pipermail/smartmontools-support/attachments/20250823/0b9e0e78/attachment.htm>
-------------- next part --------------
 {
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      4
    ],
    "pre_release": false,
    "svn_revision": "5530",
    "platform_info": "x86_64-linux-6.8.0-71-generic",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-j",
      "-a",
      "/dev/nvme1"
    ],
    "exit_status": 0
  },
  "local_time": {
    "time_t": 1755911244,
    "asctime": "Sat Aug 23 09:07:24 2025 CST"
  },
  "device": {
    "name": "/dev/nvme1",
    "info_name": "/dev/nvme1",
    "type": "nvme",
    "protocol": "NVMe"
  },
  "model_name": "Fanxiang S500Q 2TB",
  "serial_number": "FXS500Q225201038",
  "firmware_version": "VC2S038D",
  "nvme_pci_vendor": {
    "id": 4332,
    "subsystem_id": 4332
  },
  "nvme_ieee_oui_identifier": 57420,
  "nvme_controller_id": 1,
  "nvme_version": {
    "string": "1.4",
    "value": 66560
  },
  "nvme_number_of_namespaces": 1,
  "nvme_namespaces": [
    {
      "id": 1,
      "size": {
        "blocks": 4000797360,
        "bytes": 2048408248320
      },
      "capacity": {
        "blocks": 4000797360,
        "bytes": 2048408248320
      },
      "utilization": {
        "blocks": 4000797360,
        "bytes": 2048408248320
      },
      "formatted_lba_size": 512,
      "eui64": {
        "oui": 57420,
        "ext_id": 67581427987
      }
    }
  ],
  "user_capacity": {
    "blocks": 4000797360,
    "bytes": 2048408248320
  },
  "logical_block_size": 512,
  "smart_support": {
    "available": true,
    "enabled": true
  },
  "smart_status": {
    "passed": true,
    "nvme": {
      "value": 0
    }
  },
  "nvme_smart_health_information_log": {
    "critical_warning": 0,
    "temperature": 48,
    "available_spare": 100,
    "available_spare_threshold": 32,
    "percentage_used": 4,
    "data_units_read": 101139930,
    "data_units_written": 287226748,
    "host_reads": 3024400773,
    "host_writes": 2191592388,
    "controller_busy_time": 0,
    "power_cycles": 65,
    "power_on_hours": 16141,
    "unsafe_shutdowns": 23,
    "media_errors": 0,
    "num_err_log_entries": 0,
    "warning_temp_time": 0,
    "critical_comp_time": 0
  },
  "temperature": {
    "current": 48
  },
  "power_cycle_count": 65,
  "power_on_time": {
    "hours": 16141
  },
  "nvme_error_information_log": {
    "size": 8,
    "read": 8,
    "unread": 0
  },
  "nvme_self_test_log": {
    "current_self_test_operation": {
      "value": 0,
      "string": "No self-test in progress"
    }
  }
}
-------------- next part --------------
 {
  "json_format_version": [
    1,
    0
  ],
  "smartctl": {
    "version": [
      7,
      4
    ],
    "pre_release": false,
    "svn_revision": "5530",
    "platform_info": "x86_64-linux-6.8.0-71-generic",
    "build_info": "(local build)",
    "argv": [
      "smartctl",
      "-j",
      "-a",
      "/dev/nvme0"
    ],
    "messages": [
      {
        "string": "Read 16 entries from Error Information Log failed: PRP Offset Invalid (0x013)",
        "severity": "error"
      }
    ],
    "exit_status": 12
  },
  "local_time": {
    "time_t": 1755911191,
    "asctime": "Sat Aug 23 09:06:31 2025 CST"
  },
  "device": {
    "name": "/dev/nvme0",
    "info_name": "/dev/nvme0",
    "type": "nvme",
    "protocol": "NVMe"
  },
  "model_name": "J.ZAO 5 SERIES 1TB SSD",
  "serial_number": "MHA681T000769",
  "firmware_version": "V1.19.B3",
  "nvme_pci_vendor": {
    "id": 7575,
    "subsystem_id": 7575
  },
  "nvme_ieee_oui_identifier": 3824167,
  "nvme_total_capacity": 1024209543168,
  "nvme_unallocated_capacity": 0,
  "nvme_controller_id": 0,
  "nvme_version": {
    "string": "1.4",
    "value": 66560
  },
  "nvme_number_of_namespaces": 1,
  "nvme_namespaces": [
    {
      "id": 1,
      "size": {
        "blocks": 2000409264,
        "bytes": 1024209543168
      },
      "capacity": {
        "blocks": 2000409264,
        "bytes": 1024209543168
      },
      "utilization": {
        "blocks": 2000409264,
        "bytes": 1024209543168
      },
      "formatted_lba_size": 512,
      "eui64": {
        "oui": 3824167,
        "ext_id": 9663749043
      }
    }
  ],
  "user_capacity": {
    "blocks": 2000409264,
    "bytes": 1024209543168
  },
  "logical_block_size": 512,
  "smart_support": {
    "available": true,
    "enabled": true
  },
  "smart_status": {
    "passed": false,
    "nvme": {
      "value": 4,
      "spare_below_threshold": false,
      "temperature_above_or_below_threshold": false,
      "reliability_degraded": true,
      "media_read_only": false,
      "volatile_memory_backup_failed": false,
      "persistent_memory_region_unreliable": false,
      "other": 0
    }
  },
  "nvme_smart_health_information_log": {
    "critical_warning": 4,
    "temperature": 46,
    "available_spare": 87,
    "available_spare_threshold": 10,
    "percentage_used": 90,
    "data_units_read": 32601870,
    "data_units_written": 189209282,
    "host_reads": 877972360,
    "host_writes": 4329408315,
    "controller_busy_time": 6753,
    "power_cycles": 96,
    "power_on_hours": 13731,
    "unsafe_shutdowns": 31,
    "media_errors": 1,
    "num_err_log_entries": 3,
    "warning_temp_time": 0,
    "critical_comp_time": 0
  },
  "temperature": {
    "current": 46
  },
  "power_cycle_count": 96,
  "power_on_time": {
    "hours": 13731
  }
}


More information about the Smartmontools-support mailing list