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

Take semaphore when fatal error occur in coredump with CONFIG_DEBUG_COREDUMP_BACKEND_FLASH_PARTITION on #70915

Open
liutingyue opened this issue Mar 30, 2024 · 5 comments
Assignees
Labels
area: Coredump bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@liutingyue
Copy link

liutingyue commented Mar 30, 2024

When enable CONFIG_DEBUG_COREDUMP and use flash partition as backend, the flash backend output call partition_open() and take semaphore .

If CONFIG_ASSERT enabled,the assertion log is shown as follows:

ASSERTION FAIL [((arch_is_in_isr() == 0) || ((timeout).ticks == (((k_timeout_t) {0})).ticks))] @ WEST_TOPDIR/zephyr/kernel/sem.c:136

/**
 * @brief Open the flash partition.
 *
 * @return Same as flash_area_open().
 */
static int partition_open(void)
{
	int ret;

	(void)k_sem_take(&flash_sem, FLASH_BACKEND_SEM_TIMEOUT);

	ret = flash_area_open(FLASH_PARTITION_ID, &backend_ctx.flash_area);
	if (ret != 0) {
		LOG_ERR("Error opening flash partition for coredump!");

		backend_ctx.flash_area = NULL;
		k_sem_give(&flash_sem);
	}

	return ret;
}
@liutingyue liutingyue added the bug The issue is a bug, or the PR is fixing a bug label Mar 30, 2024
Copy link

Hi @liutingyue! We appreciate you submitting your first issue for our open-source project. 🌟

Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙

@nashif nashif added area: Coredump priority: low Low impact/importance bug labels Apr 2, 2024
Copy link

github-actions bot commented Jun 2, 2024

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Jun 2, 2024
@jennifervlaar
Copy link

I have recently encountered this issue while working with Zephyr, is there an ETA of when the bug will be fixed or a workaround that anyone has found?

@github-actions github-actions bot removed the Stale label Jun 12, 2024
@liutingyue
Copy link
Author

The official team does not seem to have any plans to fix the problem in a short time. My personal suggestion is that the conditions for determining whether it is in ISR can be processed separately.

@mrkhldn
Copy link

mrkhldn commented Jun 12, 2024

There's some discussion of the same issue here, #59116, but I don't think we arrived at a good answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Coredump bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants