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

nix-collect-garbage Bus error #58

Closed
aragnon opened this issue Sep 27, 2012 · 7 comments
Closed

nix-collect-garbage Bus error #58

aragnon opened this issue Sep 27, 2012 · 7 comments

Comments

@aragnon
Copy link

aragnon commented Sep 27, 2012

Assumptions:
-/nix is on the same file system as /
-the file system holding / has no space available

In this state, run nix-collect-garbage.

The result is:

Core was generated by `/usr/bin/nix-store --gc'.
Program terminated with signal 7, Bus error.
#0 0x00007fd87a46c939 in ?? ()

(gdb) bt
#0 0x00007fd87a46c939 in ?? ()
#1 0x0000000000d6b1f8 in ?? ()
#2 0x0000000000000000 in ?? ()

@edolstra
Copy link
Member

edolstra commented Oct 2, 2012

Can you run "nix-store --gc -vvvv"?

@edolstra
Copy link
Member

edolstra commented Oct 2, 2012

Also, what platform is this?

@aragnon
Copy link
Author

aragnon commented Oct 3, 2012

Do the following to reproduce this:

dd if=/dev/urandom of=/x

(this will exit when your file system is full)

Now do: $ nix-store --gc -vvvv

On my machine this gives no output other than the Bus error mentioned in my first message.

Platform: Ubuntu Precise, x86-64

@edolstra
Copy link
Member

edolstra commented Oct 3, 2012

What Nix version is this? I've seen SQLite segfault if the disk is full, but Nix reserves some disk space (in /nix/var/nix/db/reserved) that it can delete prior to opening the SQLite DB for this reason.

@aragnon
Copy link
Author

aragnon commented Oct 3, 2012

(Nix) 1.1

Have you actually followed my instructions?

@viric
Copy link
Member

viric commented Oct 20, 2012

SIGBUS should come mainly from misaligned memory accesses. In x86-64, I think that can happen only using SIMD instructions that require aligned memory pointers with unaligned memory pointers. I don't think there is any SIMD in all what nix runs, apart from glibc's memset or memcpy, that should be properly protected about alignments.

Aragnon, can you disassemble in gdb at the sigbus location, and print 'info registers' to see what happened?

@edolstra
Copy link
Member

Closing because I can't reproduce. If the reserved file doesn't exist and the disk is full, I get error: setting synchronous mode: disk I/O error from SQLite.

meditans pushed a commit to Ericson2314/nix that referenced this issue Aug 28, 2020
…-merge-upstream

Merge upstream master into git-objects-develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants