Jump to content

Bash Bunny Firmware 1.1 - Payload Timeout [Solved]


qdba

Recommended Posts

I'm still running in the payload timeout after 1 Minute.

So I did some investigation about it.  
I made the attached  payload.txt for testing.
I put the command logger "#### Start Test payload #### at the beginning of the payload and   
logger "#### End Test payload ####" at the end. So I can examine the syslog what happens during ten payload run.

After approx. 1:30 min bunny.service is running into a timeout

.........
Apr  6 09:56:52 bunny logger: #### Loop Test payload ####
Apr  6 09:56:54 bunny logger: #### Loop Test payload ####
Apr  6 09:56:56 bunny logger: #### Loop Test payload ####
Apr  6 09:56:58 bunny systemd[1]: bunny.service start operation timed out. Terminating.
Apr  6 09:56:58 bunny systemd[1]: Failed to start bunny.service.
Apr  6 09:56:58 bunny systemd[1]: Unit bunny.service entered failed state.
Apr  6 09:56:58 bunny systemd[1]: Starting Multi-User System.
Apr  6 09:56:58 bunny systemd[1]: Reached target Multi-User System.
Apr  6 09:56:59 bunny systemd[1]: Startup finished in 2.366s (kernel) + 1min 34.343s (userspace) = 1min 36.710s.

 

The result of the command systemctl show bunny.service |grep Timeout is

TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min 30s
JobTimeoutUSec=0
 

Guess this is the reason for the payload timeout. 
Can anybody confirm this?

I willl do more investigations

syslog

payload.txt

______________________________________________________________________________________________________________________

OK got it.....

I insert the value

TimeoutSec=5min

under the [Service] section of file /lib/systemd/system/bunny.service 
Now it works with a timeout of 5 min. (see attached syslog.solved_5min_Timeout)

Be carefully, I'm not responsible for any damage of the bunny :-)

@Darren Kitchen @Sebkinne If you agree (because its part of Firmware) I can make a payload who will patch this.

syslog.solved_5min_Timeout

Edited by qdba
Link to comment
Share on other sites

With a Hi Sebkinne,

Nice, can't wait for 1.2. 

I think the idea with a payload timeout is not so bad. :wink: . With a special LED state we know if it make sense to wait for a payload to finish or not. 

 

Edited by qdba
Link to comment
Share on other sites

17 minutes ago, qdba said:

With a Hi Sebkinne,

Nice, can't wait for 1.2. 

I think the idea with a payload timeout is not so bad. :wink: . With a special LED state we know if it make sense to wait for a payload to finish or not. 

 

Setting a hard timeout means that we have to decide on a ceiling number and I don't really want to limit payload developers. If you want to make a payload that runs for days, that should be possible without getting killed.. Other than that, we could check the return code of a payload and inform the user that there was an issue.

Link to comment
Share on other sites

hi sebkinne

I changed the bunny_framework and changed the hop command at the last line to hop &

Payload does not work and when I boot in arming mode the blue Led stop blinking and goes off after a few seconds.  I can login in serial mode. 

can you confirm?

I will so some more investigation and give you some logs.

Link to comment
Share on other sites

9 hours ago, qdba said:

hi sebkinne

I changed the bunny_framework and changed the hop command at the last line to hop &

Payload does not work and when I boot in arming mode the blue Led stop blinking and goes off after a few seconds.  I can login in serial mode. 

can you confirm?

I will so some more investigation and give you some logs.

Question: How did you get into the bunny_framework and change the hop command?

Link to comment
Share on other sites

nano or vi into the file located at /usr/local/bunny/bin/bunny_framework, it is the last hop in the file at the very end and changing it to "hop &"(without the double quotes). I don't recommend it for now though and just wait for 1.2 as doing so will have effects unintended or harmful to the BB. I had an issue and restored it 3 times after changing the bunny_framework file (just me most likely), and the LEDs won't work properly after the change.

Link to comment
Share on other sites

21 minutes ago, Fang_Shadow said:

nano or vi into the file located at /usr/local/bunny/bin/bunny_framework, it is the last hop in the file at the very end and changing it to "hop &"(without the double quotes). I don't recommend it for now though and just wait for 1.2 as doing so will have effects unintended or harmful to the BB. I had an issue and restored it 3 times after changing the bunny_framework file (just me most likely), and the LEDs won't work properly after the change.

yes, that's what I said.

The only way for me to get rid of the timeout problem at the moment was set the Timeoutsec variable as I described in the first post of these thread. But it is only for experienced  linux users who knows what they do. For others waiting for FW 1.2

 

Link to comment
Share on other sites

1 hour ago, qdba said:

yes, that's what I said.

The only way for me to get rid of the timeout problem at the moment was set the Timeoutsec variable as I described in the first post of these thread. But it is only for experienced  linux users who knows what they do. For others waiting for FW 1.2

 

Mmm. I'm a Windows guy. Never really played around with Linux until I got my BB...

Link to comment
Share on other sites

6 hours ago, Sebkinne said:

You also need to set the systemd kill mode to process instead or the default process group. 

Would going into the bunny.service /lib/systemd/system/bunny.service and add KillMode=process ?

Edit: With the bunny_framework edit to fork and the service edit adding of KillMode=process seems to work, blue light is still flashing after reboot in arming mode. Now on to test some payloads.

Edited by Fang_Shadow
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...