Closed Officeyutong closed 4 months ago
Some initial investigations:
If we run bpftime start /bin/bash --norc
, everything works well. But if we run bash
in the started shell, bash will stuck for a few seconds, prints bash: /usr/bin/dirname: Argument list too long
and continues to stuck. And no logs will be printed for the new bash process.
So one guess is all logs printed by bpftime has gone to stdout, and they were eaten by a certain program that invokes bash (for example bash calls itself in bashrc), but that program was unable to process such unexpected stdout contents and just stuck.
If we still spawn bash with --norc
in the spawned bash, everything still works well. So the key piece must be in some calls in bashrc
Repdocuce:
cd examples/libbpf-tools/bashreadline && make
bpftime load ./readline
bpftime start /bin/bash --norc
Now everything works well. But if we run
bash
in the attached bash, it will stuck and won't handle any input, until a SIGINT (Ctrl+C) was sended