* [devel] rpm-build, AddressSanitizer failed to allocate 0xdfff0001000
@ 2024-04-12 4:14 Ilya Kurdyukov
2024-04-12 4:39 ` Ilya Kurdyukov
0 siblings, 1 reply; 3+ messages in thread
From: Ilya Kurdyukov @ 2024-04-12 4:14 UTC (permalink / raw)
To: ALT Linux Team development discussions
На basalt у меня не работает санитайзер в hasher:
$ cat test.c
int main() {}
$ cc test.c -O2 -fsanitize=address && ./a.out
==2140439==ERROR: AddressSanitizer failed to allocate 0xdfff0001000
(15392894357504) bytes at address 2008fff7000 (errno: 12)
==2140439==ReserveShadowMemoryRange failed while trying to map
0xdfff0001000 bytes. Perhaps you're using ulimit -v
Aborted
Какое-то время назад санитайзер работал.
Не в hasher ошибки нет, но может потому, что машину давно не обновляли,
за это время в санитайзер сломался в сизифе.
"AddressSanitizer failed to allocate 0xdfff0001000" гуглится, но решений
не нашел.
Мне надо для проверки rpm-build (4.0.4.195-alt1). На e2k поймал такую
ошибку при сборке MAKEDEV:
free(): invalid pointer
Program received signal SIGABRT, Aborted.
0x0000455555aa4308 in __pthread_kill_internal () from /lib64/libc.so.6
(gdb) bt 100
#0 0x0000455555aa4308 in __pthread_kill_internal () from /lib64/libc.so.6
#1 0x000045555593bc70 in raise () from /lib64/libc.so.6
#2 0x00004555559464c0 in abort () from /lib64/libc.so.6
#3 0x0000455555a5db78 in __libc_message () from /lib64/libc.so.6
#4 0x0000455555afe8f0 in malloc_printerr () from /lib64/libc.so.6
#5 0x0000455555af8e20 in _int_free () from /lib64/libc.so.6
#6 0x0000455555aea600 in free () from /lib64/libc.so.6
#7 0x000045555563a050 in freeHardLink () from /usr/lib64/librpm-4.0.4.so
#8 0x0000455555643960 in fsmStage () from /usr/lib64/librpm-4.0.4.so
#9 0x000045555563b180 in fsmSetup () from /usr/lib64/librpm-4.0.4.so
#10 0x0000455555854e00 in cpio_doio () from
/usr/lib64/librpmbuild-4.0.4.1.so
#11 0x000045555585a458 in writeRPM () from
/usr/lib64/librpmbuild-4.0.4.1.so
#12 0x000045555585caf0 in packageBinaries ()
from /usr/lib64/librpmbuild-4.0.4.1.so
#13 0x000045555581c440 in buildSpec () from
/usr/lib64/librpmbuild-4.0.4.1.so
#14 0x0000000000017910 in buildForTarget ()
#15 0x0000000000018440 in build ()
#16 0x000000000001b200 in main ()
Подозреваю что в rpm-build может быть выход за пределы буфера.
Но на e2k санитайзер сломался на rpm-build, но как-то по другому.
Поэтому решил проверить на x86_64.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [devel] rpm-build, AddressSanitizer failed to allocate 0xdfff0001000
2024-04-12 4:14 [devel] rpm-build, AddressSanitizer failed to allocate 0xdfff0001000 Ilya Kurdyukov
@ 2024-04-12 4:39 ` Ilya Kurdyukov
2024-04-12 5:05 ` Ilya Kurdyukov
0 siblings, 1 reply; 3+ messages in thread
From: Ilya Kurdyukov @ 2024-04-12 4:39 UTC (permalink / raw)
To: devel
Лимиты для hasher позарезали, даже rooter их вернуть не может:
$ ulimit -v
unlimited
$ hsh-shell --rooter --mountpoints=/proc $TMP
[root@localhost .in]# ulimit -v
67108864
[root@localhost .in]# ulimit -v unlimited
-bash: ulimit: virtual memory: cannot modify limit: Operation not permitted
А метод снятия ограничений сделали?
On 4/12/24 11:14, Ilya Kurdyukov wrote:
> На basalt у меня не работает санитайзер в hasher:
>
> $ cat test.c
> int main() {}
> $ cc test.c -O2 -fsanitize=address && ./a.out
> ==2140439==ERROR: AddressSanitizer failed to allocate 0xdfff0001000
> (15392894357504) bytes at address 2008fff7000 (errno: 12)
> ==2140439==ReserveShadowMemoryRange failed while trying to map
> 0xdfff0001000 bytes. Perhaps you're using ulimit -v
> Aborted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [devel] rpm-build, AddressSanitizer failed to allocate 0xdfff0001000
2024-04-12 4:39 ` Ilya Kurdyukov
@ 2024-04-12 5:05 ` Ilya Kurdyukov
0 siblings, 0 replies; 3+ messages in thread
From: Ilya Kurdyukov @ 2024-04-12 5:05 UTC (permalink / raw)
To: devel
И пусть тот, кто вводил эти лимиты, объяснит мне, как ограничение
размера выделенной ВИРТУАЛЬНОЙ памяти влияет на безопасность или
стабильность?
$ ulimit -a | grep memory
max locked memory (kbytes, -l) 8192
max memory size (kbytes, -m) unlimited
virtual memory (kbytes, -v) 67108864
Я считаю что не влияет никак, если хочется ограничить использование
памяти, то для этого есть "max memory size (-m)".
On 4/12/24 11:39, Ilya Kurdyukov wrote:
> Лимиты для hasher позарезали, даже rooter их вернуть не может:
>
> $ ulimit -v
> unlimited
> $ hsh-shell --rooter --mountpoints=/proc $TMP
> [root@localhost .in]# ulimit -v
> 67108864
> [root@localhost .in]# ulimit -v unlimited
> -bash: ulimit: virtual memory: cannot modify limit: Operation not
> permitted
>
> А метод снятия ограничений сделали?
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-12 5:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 4:14 [devel] rpm-build, AddressSanitizer failed to allocate 0xdfff0001000 Ilya Kurdyukov
2024-04-12 4:39 ` Ilya Kurdyukov
2024-04-12 5:05 ` Ilya Kurdyukov
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git