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

Crash/Restart on Octoprint Connect attempt #212

Closed
gleonard3 opened this issue Mar 7, 2021 · 15 comments
Closed

Crash/Restart on Octoprint Connect attempt #212

gleonard3 opened this issue Mar 7, 2021 · 15 comments

Comments

@gleonard3
Copy link

Steps to Reproduce

  1. Turn printer on.
  2. Attempt to connect via Octoprint
  3. Observe Restart on CR-6 screen, progress bar stalls.

Expected behavior:

  1. Octoprint just connects as normal

Actual behavior:

  1. Eventually does connect.
  2. Octoprint log details issue during handshake attempt

Logging:

2021-03-06 20:12:33,171 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2021-03-06 20:12:33,204 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 7 port/baudrate candidates: /dev/ttyUSB0@115200, /dev/ttyUSB0@250000, /dev/ttyUSB0@230400, /dev/ttyUSB0@57600, /dev/ttyUSB0@38400, /dev/ttyUSB0@19200, /dev/ttyUSB0@9600
2021-03-06 20:12:33,204 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 115200
2021-03-06 20:12:33,205 - octoprint.util.comm - INFO - Connecting to port /dev/ttyUSB0, baudrate 115200
2021-03-06 20:12:33,214 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-03-06 20:12:33,218 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:33,271 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-03-06 20:12:33,275 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:33,277 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-03-06 20:12:33,282 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:35,407 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 250000
2021-03-06 20:12:35,415 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-03-06 20:12:35,422 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:37,426 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-03-06 20:12:37,440 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:39,442 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-03-06 20:12:39,454 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:41,457 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 230400
2021-03-06 20:12:41,459 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-03-06 20:12:41,471 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:45,123 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-03-06 20:12:45,135 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:47,283 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-03-06 20:12:47,296 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:49,299 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 57600
2021-03-06 20:12:49,301 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-03-06 20:12:49,319 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:51,324 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-03-06 20:12:51,334 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:53,338 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-03-06 20:12:53,349 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:53,809 - octoprint.util.comm - WARNING - Received line:
2021-03-06 20:12:53,810 - octoprint.util.comm - WARNING - | ....................................................................................................^^^F~^F<86>ø^F~<98><80>\x00f<9e>fx^Xff\x00<86>^Fæ<98>^F<86>ø^F<9e><86><9e>ø<9e>\x00<98><80><86><98><86>^^^^æ<9e>æ<9e>æ<9e>æ<86>^Xf<86>^F<9e>x<98><9e>^Xføfx^X^F<98><80>fæà^F<9e>þ<9e><98>^X^X<98>^Fæø^F~\x00<98>f^F^Fx^F^F~f^Fx<98>^X^Xx\x00^Xx^F<98><9e>^X^Xxæ<86>^X^X^X^X^F<98>\x00f~^F<9e>þ<9e>^X<86>\x00^X<86>^^f<86><86>àfæø^F~<86><9e>^Ff<86><9e>\x00^X^Ff<9e>æ<9e>^F<86><9e>ø<9e>à<86>\x00<98><80><86><98>f<86>x^X<98><98>f\x00<98><86><9e>^F<9e>\x00<98>ø^F~þ<9e>^^ææ^F<98><9e>æ<9e>^F<9e>f<86>ø<86>àæ<9e>^F<86>ø^Fx<86><86><98><80>fæà^F<9e>þ<9e><98><98><80>æ<9e>æ<9e>\x00f<9e>à<9e>f^Fx<98>^X^Xf<86>à^F^Xx<80>^X^Xx\x00^Xx^F^X^Ffæà^F<9e>þ<9e><98>^X^X^Xfxf^F<98>^^fxæ<9e>þ<9e>^Xf<86>\x00^X^^\x00^X^X<98>^^\x00^X^Xf<9e>^F<86><9e>ø<9e>f<86>ø<86><80>fx<86>xf<86>ø<86><80>f^Ffæø<86>\x00<98>à<98>^^^X^X^X^Fþ<86>þ<86>^Fæà^F<86><9e>þ<9e>ø<9e><98>^X<9e>þ<9e>f<9e>xf<9e>^^f^F~<86><9e>þ<9e>ø<9e>\x00<98><80><86><98><86>^^^^æ<9e>æ<9e>æ<9e>æ<86>^Xf<86>^F<9e>x<98><9e>^Xføfx^X^X<98>fx^F^Fx<86><86><86><98><80>f<98>~f<98>\x00f<98>f<98>^F^X<98>þ<9e>^F^Fx<86><9e>ø<9e><86>^Ff<98>~f<98>\x00f<98>f<98>^F^X<98>þ<9e>^F^Fxf^Fx<98><80>f<98>~f<98>\x00f<98>f<98>^F^X<98>þ<9e>^F^Fx<86><9e>ø<9e><86>^Ff<98>~f<98>\x00f<98>f<98>^F^X<98>þ<9e>^F^Fxf^Fx<98><80>à<98>þ<9e>^F^Fx<86><9e>ø<9e>^F^X~f^X<86><98>\x00^X<98>^^^F\x00<98>øfx^F~<86><9e>ø<9e>~^F^Xx^Xæ<9e>æ<9e>\x00<98>^Ff\x00f<98>æ<98>æ<98><98><80>fæà^F<9e>þ<9e><98>^Xf<80><98>x\x00<98>ø^Fþ<9e>^Xfx^F<98>øfx^F~<86><9e>ø<9e>æø^F^Xøfx<86>øf<9e>f<86>~f^Fx\x00^X<86>~^X^^~^X^Xàf^F~fæøæ~\x00<98>à<86>øæà^F<98>x~<98>x~^Xx<86><86><98><80>f<80><86>øf<9e>ø<9e>^F^X<86>øæ<9e>^Xfx<98><80>þ<86>þ<86>^Fæà^F~<86><9e>þ<9e>ø<9e><98>^X<86>øæ<9e>æ<9e>\x00^Fþf<86><86><9e><86>^F^X^F<98>^X^X^^^^^Fff<98><80>^F<9e>fæàææ^F<98>øf~^^æàfxf^Fxf^Fx^F^X^Fæ<98>^F<86>ø^F<9e><86><9e>ø<9e>àfø<86>øæà^Ffx^^æ<9e>fxàfàffff<86><86>^^^F^F^F^^^X^X~\x00<98><98>^Ff<98><80><86>~^Ff<9e>à<9e>^F<86>à^F<9e>f^F^Xàf~^F^Xøfx^F^Fx\x00<98><9e><98>à^X^F<98><80><98><80>^^<98>\x00<98><98>æ<9e>x^F~~f<86>øfx\x00^X^Ffà<9e>^F^Xxf^F~fæà^F~f^Fx\x00<98>^^^X^F^^ff~^^fx<98>^X^X<98>^F<86>ø^Fx<98><80>^Xf^X^X^X^X~\x00^X^X^F^X^X^X^X^X^X^X^X^F^Xfà^X^X^X^X~\x00^X^X<86>x\x00^X^X^Xx<86>^^x<86>^F^Xfx\x00^X^X^X~\x00^X^X^F^X^X^X^X^X<98>à^X^^<98><80>^Xfx\x00^X^X^X~\x00^X^X^F^X^X^X^X^X^X^X^X^F^Xfà^Xx\x00^X^X~\x00^X^X^F^X^X^X^X^X^X<98>\x00<86>^Fà<98>^Xf^X^X^X~\x00^X^X^F^X^X^X<98>^^f^X^^f^X^F\x00f<80>^F^X^X^X~\x00^X^X^F^X^X<98>à^X^^x^F<98><80><86>^F\x00f<98><86><98>^F^X^X~\x00^X^X<86>^^^F^X^X^X^X^X^X^X^F^^<86>^^f<98>^F^X~\x00^X^X^F^X^X^X^X^X^X^X^X^F<80><98>xæ<98><86><98>^F^X~\x00^X^X^F^^\x00^X^X^X^X^X^X^X^F<86>^^f<98>^F^X~\x00^X^X^F^X^X^X^X^X^X^X^X^F^F<86>^^f<98>^F^X~\x00^X^X^F^X^X^X^X^X^X^X^X^Fæ<98>æ<98>^F<86><98>^F^X~\x00^X^Xf\x00^X^X<98>^F^F^^^X^^<98><80>^X<86>^F<86><98>^F^X~\x00^X^Xf\x00^X^X<98>^F^F^^^X^X^Ff^Fæà^F<98>^Xf~\x00^X^X<86>x<86>x<86>x<86><86>^X^Ff^Fæàæ<98>^Ff~\x00^X^X<86>x\x00^X^X^Xx<86>^^\x00^X^F^Xfæàææ^F~^Xfæàfx<98><98>^F^X^X~\x00<98>æ<86><9e><9e><9e>ø<9e>þ<9e><86><9e>\x00^F^X^F^X^X<98>à^X^^xæx<98>f<80>^X^X^Xf<80><86>~\x00^X^F^X^X<98>à^X^^x^F<98><80><86>^F^^^Xx\x00^X~\x00<98>æ<86><9e><9e><9e>ø<9e>þ<9e>~<86><9e>\x00^F^X^F^X^X<98>à<98>^^^F^Xx^^æf^F^X^^\x00^Xf<80><86>~\x00^X^F^X^X<98>à<98>^^^F<98>x^F<86>^F^^<98>x\x00^X~\x00<98>æ<86><9e><9e><9e>ø<9e>þ<9e>~<86><9e>\x00^F^X^F^X^X^X^X``<98>^^<98>f^F^X^X^Xf<80><86>\x00^X^F^X^X^X^X``<98>^^f<86>^Fø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>ø<86>!îÈó^N<90><9d>^M^HÂ^Bm@[^L1
2021-03-06 20:12:53,810 - octoprint.util.comm - WARNING - The received line contains at least one null byte character at position 110, this hints at some data corruption going on
2021-03-06 20:12:53,821 - octoprint.util.comm - WARNING - Received line:
2021-03-06 20:12:53,821 - octoprint.util.comm - WARNING - | <9d>!\x00<9d>¿MHJ<9d><8a><8a><88><98><8f>N^H Á!ΨÞÖ ^H
2021-03-06 20:12:53,822 - octoprint.util.comm - WARNING - The received line contains at least one null byte character at position 2, this hints at some data corruption going on
2021-03-06 20:12:57,001 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 38400
2021-03-06 20:12:57,003 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-03-06 20:12:57,016 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:12:59,175 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-03-06 20:12:59,189 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:01,192 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-03-06 20:13:01,207 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:03,212 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 19200
2021-03-06 20:13:03,215 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-03-06 20:13:03,228 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:05,232 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-03-06 20:13:05,244 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:08,890 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-03-06 20:13:08,903 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:11,049 - octoprint.util.comm - INFO - Serial detection: Trying port /dev/ttyUSB0, baudrate 9600
2021-03-06 20:13:11,051 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #1 with timeout 2.0s
2021-03-06 20:13:11,066 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:13,068 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #2 with timeout 2.0s
2021-03-06 20:13:13,080 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:15,083 - octoprint.util.comm - INFO - Serial detection: Handshake attempt #3 with timeout 2.0s
2021-03-06 20:13:15,096 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:17,098 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
2021-03-06 20:13:17,137 - octoprint.util.comm - INFO - Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
2021-03-06 20:13:17,195 - octoprint.plugins.excluderegion - INFO - Printing stopped: event=Error
2021-03-06 20:13:17,224 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2021-03-06 20:13:17,880 - octoprint.plugins.tracking - INFO - Sent tracking event commerror_autodetect, payload: {'commerror_text': 'No more candidates to test, and no working port/baudrate combination detected.'}
2021-03-06 20:13:29,558 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Opening serial connection"
2021-03-06 20:13:29,560 - octoprint.util.comm - INFO - Connecting to port /dev/ttyUSB0, baudrate 115200
2021-03-06 20:13:29,593 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial connection" to "Connecting"
2021-03-06 20:13:29,605 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:29,610 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:29,620 - octoprint.util.comm - INFO - Changing monitoring state from "Connecting" to "Operational"
2021-03-06 20:13:29,632 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2021-03-06 20:13:29,788 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin CR-6 community firmware - release 6 - prerelease 4 (Feb 28 2021"
2021-03-06 20:13:29,836 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
2021-03-06 20:13:29,860 - octoprint.util.comm - INFO - Firmware states that it supports emergency GCODEs to be sent without waiting for an acknowledgement first
2021-03-06 20:13:30,591 - octoprint.plugins.tracking - INFO - Sent tracking event printer_connected, payload: {'firmware_name': 'Marlin CR-6 community firmware - release 6 - prerelease 4 (Feb 28 2021', 'printer_port': '/dev/ttyUSB0', 'printer_baudrate': 115200}

Additional Information

Kickstarter 4.5.2 board, all stock

CR6-SE, CF6-prerelease 4, Octoprint 1.5.3, Raspberry Pi 3 Model B Rev 1.2

[Which exact firmware version did you flash? Provide a link to the download you have used.]

CF6-Pre4-cr6-se-v4.5.2-mb-2021-02-28-13-49.zip

@ritchiedc
Copy link

ritchiedc commented Mar 7, 2021

I can confirm my printer does the same. I did notice that if Octoprint Baudrate is set to 115200 instead of auto the reboot does not stall and after reboot it connects. It only seems to restart (crash) on first attempt after power on. I'll try reverting to previous versions to see when the problem started.

UPDATE: Prelease 3 does not exhibit this behavior. Let me know if you need more info.

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 7, 2021

These are probably bugs imported from upstream, I suspect either of these two:

I have compiled a release based on the latest sources merged from upstream:

CF6-Nightly-cr6-se-v4.5.2-mb-2021-03-07-19-11.zip                    CR-6 SE (v4.5.2 motherboard)                                                                    C58098A6476D2D26A116DA63435C16DDDEA9CDE66F566B574EF2FE6DCB3975E6

CF6-Nightly-cr6-se-v4.5.2-mb-2021-03-07-19-11.zip

Verify that it is flashed in the info menu. If this doesn't work, I suggest you take this upstream.

@ritchiedc
Copy link

The nightly still crashes

@gleonard3
Copy link
Author

just confirmed as well... nightly still crashes as before

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 7, 2021

Then I suggest you take the configuration files and report this upstream, probably in one of these issues.

Sorry, this is out of my hands. 👍

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 8, 2021

@gleonard3 @ritchiedc One afterthough, can you please try this build:

CF6-Nightly2-cr6-se-v4.5.2-mb-2021-03-08-10-52.zip

Verify it is flashed as nightly2 in the info menu.

I have disabled #define POSTMORTEM_DEBUGGING in this build.

@ritchiedc
Copy link

It still has problems but does not restart. I use octoprint to monitor prints (mostly video) from my house and often don't remember to start it before starting a print. My prints would sometimes "mysteriously" stop and I'd be back at the home screen. I now know it is related to this issue. My print is no longer interrupted but starting the comm interface is not nearly as clean as with pre3. You may want to mention this in the release notes. I don't know if it is only related to MB 4.5.2. It feels like a pointer is not properly initialized at power-on but is somewhat OK after an internally initiated restart. As a sidenote, once the interface is working I can disconnect and reconnect octoprint with no problems. I may continue to try to trace the source of the problem but I am a novice at git so it may take some time to "undo" changes from pre3 to pre4 to see what change caused the problem.

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 8, 2021

Because this is hardware serial communication what goes wrong, I'm pretty sure that this is not my doing but rather something upstream. On the BTT SKR board, which uses software serial, at least for Octoprint, I see no issues.

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 9, 2021

Well, this is not true anymore either. I think MEATPACK support is to blame.

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 9, 2021

CR6Comm-Bug212-NoMEATPACK.zip

@ritchiedc @gleonard3 Please try this. Ignore any touch screen issues. Verify that it flashed correctly in the info menu, it should show CR6Comm-Bug212-NoMEATPACK.

@ritchiedc
Copy link

Your "NoMEATPACK" build works. Did you re-enable POSTMORTEM?

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 9, 2021

Well, that news makes allows me to sleep at night 😀

CR6Pre6-Bug212-WPostMortemDbg.zip - this build marked with CR6Pre6-Bug212-WPostMortemDbg in the info menu has postmortem debugging also enabled.

If you plan on keeping this installed, here is matching touch screen firmware:
CR-6-touchscreen-2021-03-09.zip

@ritchiedc
Copy link

I just made a build with the latest commits without Meatpack and with Postmortem and it works without problems. I'll also try your build.

@ritchiedc
Copy link

Just tried your Postmortem build with screen flashed and it works.

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 9, 2021

Wow, that's good, thanks for checking out. Unfortunately postmortem debugging is not available for software serial as used on BTT SKR boards. But hey, we got unlimited baudrate 😆

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

3 participants