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

firemon error: recv: No buffer space available #2700

Closed
smitsohu opened this issue May 16, 2019 · 2 comments
Closed

firemon error: recv: No buffer space available #2700

smitsohu opened this issue May 16, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@smitsohu
Copy link
Collaborator

smitsohu commented May 16, 2019

This looks like a non-deterministic bug.

In one terminal run sudo firemon, then start a sandbox:

smitsohu@smitsohu:~$ sudo firemon
13:58:01 uid (1000:0) 22759 (root) NEW SANDBOX: firejail 
13:58:01 exec 22759 (smitsohu) firejail 
13:58:01 fork 22759 (smitsohu) firejail 
	child 22760 firejail 
13:58:01 fork 22759 (smitsohu) firejail 
	child 22761 firejail 
13:58:01 exit 22761 (smitsohu)
13:58:01 fork 22760 (smitsohu) firejail 
	child 22762 firejail 
13:58:01 gid (1000:1000) 22762 (smitsohu) firejail 
13:58:01 uid (1000:1000) 22762 (smitsohu) firejail 
13:58:01 exec 22762 (smitsohu) /run/firejail/lib/fseccomp protocol build unix,inet,inet6 /run/firejail/mnt/seccomp/seccomp.protocol 
13:58:01 exit 22762 (smitsohu)
recv: No buffer space available
firemon: procevent.c:499: procevent: Assertion `0' failed.
Aborted

If the code is instrumented with fsanitize=undefined, this is the result:

procevent.c:288:19: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 00 00 00 00  03 00 00 00 d1 a7 de ff  ea d3 00 00 00 00 00 00  00 00 00 00 00 00 00 00
              ^ 
procevent.c:293:34: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 01 00 00 00  00 00 00 00 9a f8 58 a3  eb d3 00 00 f3 08 00 00  f3 08 00 00 38 3c 00 00
              ^ 
procevent.c:294:34: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 01 00 00 00  00 00 00 00 9a f8 58 a3  eb d3 00 00 f3 08 00 00  f3 08 00 00 38 3c 00 00
              ^ 
procevent.c:296:10: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 01 00 00 00  00 00 00 00 9a f8 58 a3  eb d3 00 00 f3 08 00 00  f3 08 00 00 38 3c 00 00
              ^ 
procevent.c:310:10: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 02 00 00 00  02 00 00 00 86 e2 dd a3  eb d3 00 00 38 3c 00 00  38 3c 00 00 00 00 00 00
              ^ 
procevent.c:321:34: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 00 00 00 80  02 00 00 00 c7 34 f4 a9  eb d3 00 00 3b 3c 00 00  39 3c 00 00 00 00 00 00
              ^ 
procevent.c:322:34: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 00 00 00 80  02 00 00 00 c7 34 f4 a9  eb d3 00 00 3b 3c 00 00  39 3c 00 00 00 00 00 00
              ^ 
procevent.c:325:10: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 00 00 00 80  03 00 00 00 7d af fc a9  eb d3 00 00 39 3c 00 00  39 3c 00 00 00 00 00 00
              ^ 
procevent.c:370:10: runtime error: member access within misaligned address 0x7ffea9197bc4 for type 'struct proc_event', which requires 8 byte alignment
0x7ffea9197bc4: note: pointer points here
  28 00 00 00 80 00 00 00  01 00 00 00 ba 06 bb 73  ef d3 00 00 65 3c 00 00  65 3c 00 00 00 00 00 00
              ^ 

and so on ...
@smitsohu
Copy link
Collaborator Author

smitsohu commented May 16, 2019

I should add that I'm seeing the UBSan messages only on one machine, I cannot reproduce them for example in my virtual machines.

@SkewedZeppelin
Copy link
Collaborator

I've seen this error before from firemon, but haven't in a while.

@netblue30 netblue30 added the bug Something isn't working label May 17, 2019
kmk3 added a commit that referenced this issue Aug 12, 2023
This fixes the following errors:

    $ make codespell
    [...]
    codespell --ignore-regex "UE|creat|doas|shotcut|ether" src test
    src/firemon/procevent.c:188: duble ==> double
    src/fnettrace/main.c:30: postive ==> positive
    src/fnettrace/main.c:30: defiend ==> defined
    src/fnettrace/main.c:482: isplay ==> display
    make: *** [Makefile:371: codespell] Error 65
    $ codespell --version
    2.2.5

Added in the following commits:

* bef5d86 ("increase socket buffer size for firemon, bug #2700",
  2019-09-29)
* c496278 ("nettrace stats", 2023-08-08)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants