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

CRIU swrk mode crash on restore (once) #245

Closed
xemul opened this issue Nov 16, 2016 · 3 comments
Closed

CRIU swrk mode crash on restore (once) #245

xemul opened this issue Nov 16, 2016 · 3 comments

Comments

@xemul
Copy link
Member

xemul commented Nov 16, 2016

https://api.travis-ci.org/jobs/176298120/log.txt?deansi=true

Core was generated by `../criu/criu swrk 4'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000422ed9 in usernsd (sk=5) at criu/namespaces.c:1215
1215 BUG_ON(fd < 0 && flags & UNS_FDOUT);
(gdb) #0 0x0000000000422ed9 in usernsd (sk=5) at criu/namespaces.c:1215
#1 0x0000000000477c6c in start_usernsd () at criu/namespaces.c:1385
#2 0x000000000047a6b1 in prepare_namespace_before_tasks ()
at criu/namespaces.c:1684
#3 0x000000000042253d in restore_root_task (init=0x2b4b6c4c0458)
at criu/cr-restore.c:1796
#4 0x000000000044c514 in cr_restore_tasks () at criu/cr-restore.c:2069
#5 0x00000000004505cd in restore_using_req (sk=sk@entry=4,
req=) at criu/cr-service.c:562
#6 0x0000000000450984 in cr_service_work (sk=4) at criu/cr-service.c:931
#7 0x0000000000424323 in main (argc=3, argv=0x7fff312ddbe8,
envp=) at criu/crtools.c:319
(gdb) rax 0xdead04bf 3735880895
rbx 0x5 5
rcx 0x2b4b6c6d01fb 47602941624827
rdx 0x6 6
rsi 0xb3 179
rdi 0xb3 179
rbp 0x2 0x2
rsp 0x7fff312dd850 0x7fff312dd850
r8 0x0 0
r9 0x2b4b00000000 47601122541568
r10 0x7fff312dd610 140734018475536
r11 0x202 514
r12 0x752a 29994
r13 0x7fff312ddbe0 140734018477024
r14 0x0 0
r15 0x0 0
rip 0x422ed9 0x422ed9 <usernsd+364>
eflags 0x10203 [ CF IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) Dump of assembler code from 0x422ec9 to 0x422ee9:
0x0000000000422ec9 <usernsd+348>: retq
0x0000000000422eca <usernsd+349>: cmpsb %es:(%rdi),%ds:(%rsi)
0x0000000000422ecb <usernsd+350>: (bad)
0x0000000000422ecc <usernsd+351>: decl -0x1(%rax)
0x0000000000422ecf <usernsd+354>: add $0x38814c,%eax
0x0000000000422ed4 <usernsd+359>: mov $0xdead04bf,%eax
=> 0x0000000000422ed9 <usernsd+364>: mov %rax,0x0
0x0000000000422ee1 <usernsd+372>: mov $0x7ab7e0,%edi
0x0000000000422ee6 <usernsd+377>: mov 0x14(%rsp),%edx
End of assembler dump.
(gdb) Dump of assembler code from 0x422ec9 to 0x422ee9:
0x0000000000422ec9 <usernsd+348>: retq
0x0000000000422eca <usernsd+349>: cmpsb %es:(%rdi),%ds:(%rsi)
0x0000000000422ecb <usernsd+350>: (bad)
0x0000000000422ecc <usernsd+351>: decl -0x1(%rax)
0x0000000000422ecf <usernsd+354>: add $0x38814c,%eax
0x0000000000422ed4 <usernsd+359>: mov $0xdead04bf,%eax
=> 0x0000000000422ed9 <usernsd+364>: mov %rax,0x0
0x0000000000422ee1 <usernsd+372>: mov $0x7ab7e0,%edi
0x0000000000422ee6 <usernsd+377>: mov 0x14(%rsp),%edx
End of assembler dump.
(gdb) quit

@xemul xemul added the bug label Nov 16, 2016
@xemul
Copy link
Member Author

xemul commented Nov 16, 2016

Cc @avagin and @efiop

@xemul
Copy link
Member Author

xemul commented Apr 3, 2017

64c2558
(then rolled back by d979f3f)

xemul referenced this issue Apr 7, 2017
As access to /proc/[pid]/fd/[i] of a task from parent's
user_ns is prohibited, introduce a helper, doing that
via usernsd.

Also, remove BUG_ON() in usernsd, as now it may be used
without input fd parameter.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant