You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Describe the bug
When simulating the /bin/sh process, after the shell starts, the pwd command displays normally, but when the ls or id command is entered, it raises the gevent.exceptions.LoopExit exception.
Expected behavior
all command in shell displays normally
Screenshots
[+] [Thread 2000] Received interrupt: 0x2
[+] [Thread 294468] Received interrupt: 0x2
[+] [Thread 294468] 0x901ca24c: futex(uaddr = 0x9021f034, op = 0x0, val = 0x2, timeout = 0x0, uaddr2 = 0x1, val3 = 0x9021f034) = 0x0
[+] [Thread 294468] Suspended at 0x901ca24c
[+] [Thread 294468] Saved context. c13_c0_3=0x902224a0
[+] [Thread 294468] Call sched_cb: <function QlLinuxFutexManagement.futex_wait.<locals>._sched_wait_event at 0x7f800df500d0>
[+] [Thread 294468] Wait for notifications.
Traceback (most recent call last):
File "qiling_vigor.py", line 15, in <module>
my_sandbox(["./rootfs/bin/sh"], "./rootfs/")
File "qiling_vigor.py", line 12, in my_sandbox
ql.run()
File "/root/.local/lib/python3.8/site-packages/qiling/core.py", line 597, in run
self.os.run()
File "/root/.local/lib/python3.8/site-packages/qiling/os/linux/linux.py", line 164, in run
thread_management.run()
File "/root/.local/lib/python3.8/site-packages/qiling/os/linux/thread.py", line 618, in run
gevent.joinall([self.main_thread], raise_error=True)
File "src/gevent/greenlet.py", line 1065, in gevent._gevent_cgreenlet.joinall
File "src/gevent/greenlet.py", line 1078, in gevent._gevent_cgreenlet.joinall
File "src/gevent/_hub_primitives.py", line 185, in gevent._gevent_c_hub_primitives._WaitIterator.__next__
File "src/gevent/_hub_primitives.py", line 176, in gevent._gevent_c_hub_primitives._WaitIterator.__next__
File "src/gevent/_waiter.py", line 195, in gevent._gevent_c_waiter.MultipleWaiter.get
File "src/gevent/_waiter.py", line 154, in gevent._gevent_c_waiter.Waiter.get
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
gevent.exceptions.LoopExit: This operation would block forever
Hub: <Hub '' at 0x7f800e083810 epoll default pending=0 ref=0 fileno=3 thread_ident=0x7f805236a740>
Handles:
[]
[+] [Thread 2000] 0x9018b1fc: wait4(pid = 0xffffffff, wstatus = 0x7ff3ca14, options = 0x0, rusage = 0x0) = 0x47e44
[+] [Thread 2000] Received interrupt: 0x2
[+] [Thread 2000] 0x901b5b1c: ioctl(fd = 0x0, cmd = 0x5401, arg = 0x7ff3ba0c) = 0x0
[+] [Thread 2000] Received interrupt: 0x2
Additional context
└─# python3 qiling_v.py
BusyBox v1.4.2 (2022-04-13 20:52:17 CST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
./rootfs/bin/sh: can't access tty; job control turned off
/ # pwd
/
/ # ls
ls
Traceback (most recent call last):
File "qiling_vigor.py", line 15, in <module>
my_sandbox(["./rootfs/bin/sh"], "./rootfs/")
File "qiling_vigor.py", line 12, in my_sandbox
ql.run()
File "/root/.local/lib/python3.8/site-packages/qiling/core.py", line 597, in run
self.os.run()
File "/root/.local/lib/python3.8/site-packages/qiling/os/linux/linux.py", line 164, in run
thread_management.run()
File "/root/.local/lib/python3.8/site-packages/qiling/os/linux/thread.py", line 618, in run
gevent.joinall([self.main_thread], raise_error=True)
File "src/gevent/greenlet.py", line 1065, in gevent._gevent_cgreenlet.joinall
File "src/gevent/greenlet.py", line 1078, in gevent._gevent_cgreenlet.joinall
File "src/gevent/_hub_primitives.py", line 185, in gevent._gevent_c_hub_primitives._WaitIterator.__next__
File "src/gevent/_hub_primitives.py", line 176, in gevent._gevent_c_hub_primitives._WaitIterator.__next__
File "src/gevent/_waiter.py", line 195, in gevent._gevent_c_waiter.MultipleWaiter.get
File "src/gevent/_waiter.py", line 154, in gevent._gevent_c_waiter.Waiter.get
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
gevent.exceptions.LoopExit: This operation would block forever
Hub: <Hub '' at 0x7f735e5a4680 epoll default pending=0 ref=0 fileno=3 thread_ident=0x7f73a289b740>
Handles:
[]
/ #
The text was updated successfully, but these errors were encountered:
*Describe the bug
When simulating the /bin/sh process, after the shell starts, the pwd command displays normally, but when the ls or id command is entered, it raises the gevent.exceptions.LoopExit exception.
Sample Code
Expected behavior
all command in shell displays normally
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: