LINUX.ORG.RU

pthread_cond_wait and SIGBUS (ARMv7 RPi 3 B)

 , , ,


0

1

Я так понял, сейчас для RPi 3 B только 32-битное ядро в стабильной версии?

В нём на вызове pthread_cond_wait(...) вылетает сигнал SIGBUS.

Это raspbian stretch 32-bit.

Подскажите, где искать причину. Второй день копаю по инету, не могу понять. Единственное, что нашёл, это про 64-битные Ubuntu 13.04 и Debian, сообщение от «Oleg Osovitskiy» - pthread_detach(pthread_self()); https://stackoverflow.com/questions/21328622/pthread-detach-causes-sigsegv-on...

I don't know how to submit a bug report to the GCC team. I can't reproduce the problem on a small simple application and I can't hand them my project because it is a proprietary software.

CC = gcc -c -g3 -fno-omit-frame-pointer -O0 -fstack-usage -fstack-protector-all -fsanitize=address $(CC_INCLUDE) $(CC_DEFINES) LK_END = -lm -lpthread -lrt -lasan

ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xef54c4160d386b056bcf893907738018e3d4e1fd, not stripped.

Если тебе ехать - можно семафоры попробовать. Если шашечки - то минимальный воспроизводимый пример нужен как минимум.

pon4ik ★★★★★
()
Ответ на: комментарий от pon4ik

Если шашечки - то минимальный воспроизводимый пример нужен как минимум.

Сейчас попробую написать example.c

Mirage1_
() автор топика
Ответ на: комментарий от Mirage1_

Такие вещи обычно msan ловит, конкретно под arm - не пробовал.

pon4ik ★★★★★
()

SIGBUS это доступ по не выравненному адресу. у ядра есть настройка которая говорит что делать. выкидывать SIGBUS, игнорить или применять пути обхода.

anonymous
()
To change the alignment trap behavior, simply echo a number into
/proc/cpu/alignment.  The number is made up from various bits:
bit		behavior when set
---		-----------------
0		A user process performing an unaligned memory access
		will cause the kernel to print a message indicating
		process name, pid, pc, instruction, address, and the
		fault code.
1		The kernel will attempt to fix up the user process
		performing the unaligned access.  This is of course
		slow (think about the floating point emulator) and
		not recommended for production use.
2		The kernel will send a SIGBUS signal to the user process
		performing the unaligned access.
anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.