Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[threadx-users] [help] Question about _tx_byte_allocate / _tx_byte_release behavior in ThreadX 6.1.1
  • From: <Itsuki.Kanno@xxxxxxxxxxxx>
  • Date: Thu, 4 Dec 2025 10:04:09 +0000
  • Accept-language: ja-JP, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=yokogawa.com; dmarc=pass action=none header.from=yokogawa.com; dkim=pass header.d=yokogawa.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MBPgSm4ZzSONtGoFZk4IdZ421PEZ924H2tH0/tVKWJA=; b=opgltC67RPzpvEh5ZPPfU6hYwzcJ5yJvmMPTfL9wRa7GHT5+skL1xZnq4wUw+03gXD5V44bLmTflHstqJEpxUNbWG+A7y+YLhkNrZ0vft8TrPFQih6Z4kbBIijpH8E6SETU/s+CpxhSDUbmGuH51Vh8n8psp9Ad3ly+lqVIut4s7CkZTV8I+BIpXMHY3A69Jw6P3+UEdx+7+UOIG/Vzan8yJNJuGdhv04ftDBGQ+1kOrjyDtr2fkEq+agABFy/MFZ9ZQ9TwloTKyhfm4z0HEZqnIuLQVFvdsE6GCH1XXKPzy84IdM9m40XlPO8xhlB8uWTknVBC8/nIuk8t/0cpmww==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tvx7mXScZhHWY7Sq9wDSKFU5sSwxaWlHQGC7NETYN0pfL9jHLZSv9fjj37PHmY70CPftcZDOIm2+Wuk8a6V3M1fenSdrTbtsj6LehuBZYuVLfH1rbu70PxYP6B6WwOgiV/xGMwMOvzjiT6+L7YKdHkRgGpajsh8KVpH5L9az3etjXki+gnAx0cxl+bFt52LRn1C38bIhKvOwScg4MLwkZznJsBNv65ueaV+jAOFSc/DgNm80xFPBCK0eMMT5zwT3Q57HmORaY0kx9eJuuILV/KJeDq9HnBBZXWFCH+hNyU2wQ745uJ/6Kx9TmzPtQ8cIUEVQ3+0KGE4HE0ZE/fkehw==
  • Composetype: newMail
  • Delivered-to: threadx-users@xxxxxxxxxxx
  • Drawingcanvaselements: []
  • List-archive: <https://www.eclipse.org/mailman/private/threadx-users/>
  • List-help: <mailto:threadx-users-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/threadx-users>, <mailto:threadx-users-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/threadx-users>, <mailto:threadx-users-request@eclipse.org?subject=unsubscribe>
  • Msip_labels: MSIP_Label_277a80f2-c852-488e-92a6-9c3bbdc34d5f_Enabled=True; MSIP_Label_277a80f2-c852-488e-92a6-9c3bbdc34d5f_SiteId=0da2a83b-13d9-4a35-965f-ec53a220ed9d; MSIP_Label_277a80f2-c852-488e-92a6-9c3bbdc34d5f_SetDate=2025-12-04T07:43:21.911Z; MSIP_Label_277a80f2-c852-488e-92a6-9c3bbdc34d5f_Name=Public; MSIP_Label_277a80f2-c852-488e-92a6-9c3bbdc34d5f_ContentBits=1; MSIP_Label_277a80f2-c852-488e-92a6-9c3bbdc34d5f_Method=Standard;
  • Thread-index: AQHcZPEJ6c0CD4QFKEejTQ9oIyzWeA==
  • Thread-topic: [help] Question about _tx_byte_allocate / _tx_byte_release behavior in ThreadX 6.1.1
  • Undefined: 1879660

Dear ThreadX community,


I am working with ThreadX version 6.1.1 on TI AM2431 (Cortex-R5 core only), using Arm Compiler for Embedded FuSa 6.16.2 with optimization level -O0.

We have a single static global byte pool shared by multiple tasks. Occasionally, under heavy load, we observe inconsistent pool information when using `_tx_byte_allocate` and `_tx_byte_release`.

Specifically:
- After a successful `_tx_byte_allocate`, the header of the allocated block appears correct.
- However, after `_tx_byte_release`, the reverse pointer in the block header is unexpectedly set to `TX_BYTE_BLOCK_FREE`, even though the block was not freed yet.
- Additionally, the "next block" pointer inside the same block sometimes changes to an old value from a previous allocation.
- This issue seems to occur right after `_tx_byte_pool_search` performs a block split during allocation.

My concern is whether this behavior could be related to GitHub Issue #334, which mentions pool corruption under `-O3` or `-O2` optimization. In our case, we are using `-O0`, so the conditions differ.

Could you please advise if this is a known issue in ThreadX 6.1.1 or if it is likely caused by our application code?

Thank you for your support.

Best regards,
KANNO, Itsuki
Yokogawa Electric Corp.
Yokogawa Products HQ Sensing Center Development Div.
Analyzer Development Dep. Software Sec. Gr.1
Email: Itsuki.Kanno@xxxxxxxxxxxx
TEL: +81-70-1005-8039
M22-3, 9-32, Nakacho 2-chome, Musashino-shi, Tokyo 180-8750, Japan
-----
CONFIDENTIAL: This e-mail may contain information that is confidential or otherwise protected from disclosure and intended only for the party to whom it is addressed. If you are not the intended recipient, please notify the sender by return and delete this e-mail. You are hereby formally advised that any unauthorized use, disclosure or copying of this email is strictly prohibited and may be unlawful.

Back to the top