kometchtech / docker-build

personal docker build for armhf and aarch64
15 stars 5 forks source link

SIGBUS received; this is most likely due to filling up the filesystem where cache resides. #4

Closed kometchtech closed 6 years ago

kometchtech commented 6 years ago

knot resolverで以下のようなエラーが発生する。

SIGBUS received; this is most likely due to filling up the filesystem where cache resides.
Cache file deleted.
kresd can not recover reliably by itself, exiting.

SIGBUS received; this is most likely due to filling up the filesystem where cache resides.
Cache file deletion failed.
kresd can not recover reliably by itself, exiting.

root zoneをダウンロードして更新するタイミングで失敗する?

[prefill] downloading root zone...
[prefill] saving root zone...
[prefill] root zone successfully parsed, import started
[prefill] root zone refresh in 23 hours 59 minutes
[ ta ] key: 19036 state: Valid
[ ta ] key: 20326 state: Valid
[ ta ] next refresh for . in 24 hours

-O0を設定して最適化を無効、-heap-arraysも設定したうえで問題が変化するか確認する。 https://github.com/kometchtech/docker-build/blob/c4f6cf66c6198a8dd70883bd04b4d892ea21ed27/kresd/Dockerfile#L13

kometchtech commented 6 years ago

Docker + Chromium = SIGBUS - A Blog https://csmarosi.github.io/sigbus.html

どうやら、Dockerコンテナに対して、/dev/shmがデフォルトだと64MBしか割り当てないため、 OOM-killerが走ってしまうためらしい。

解決策としては、/dev/shmをホストにマウントするようにすればよい。

-v /dev/shm:/dev/shm -v /run/shm:/run/shm