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

beta.1 crashes after ctrl-d after exception in REPL #2378

Closed
dhalbert opened this issue Dec 12, 2019 · 8 comments · Fixed by #2380
Closed

beta.1 crashes after ctrl-d after exception in REPL #2378

dhalbert opened this issue Dec 12, 2019 · 8 comments · Fixed by #2380
Milestone

Comments

@dhalbert
Copy link
Collaborator

Same result on CPB, so it's not port-specific:

$ repl
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Metro M4 Express with samd51j19
>>> [ctrl-d]
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.



Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Metro M4 Express with samd51j19
>>> asdf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'asdf' is not defined
>>> [ctrl-d]

FATAL: read zero bytes from port
term_exitfunc: reset failed for dev UNKNOWN: Input/output error
@dhalbert dhalbert added this to the 5.0.0 milestone Dec 12, 2019
@jerryneedell
Copy link
Collaborator

I cannot reproduce this
on my CPB


Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Circuit Playground Bluefruit with nRF52840
>>> 
>>> 
>>> adasdsa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'adasdsa' is not defined
>>> 
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.



Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Circuit Playground Bluefruit with nRF52840
>>> 

@jepler
Copy link
Member

jepler commented Dec 12, 2019

Locally I built with gcc9 and gcc7. I reproduce this with 9, but not with 7.

@dhalbert has already identified one specific place where code changed and made a problem (volatile is now needed to get the same result); this may be some other thing.

Perhaps we should consider reverting to the older compiler at this time. @tannewt thoughts?

@tannewt
Copy link
Member

tannewt commented Dec 12, 2019

Has anyone reproduced this under GDB? I wouldn't rollback the compiler unless we can't figure it out.

@jerryneedell
Copy link
Collaborator

Locally I built with gcc9 and gcc7. I reproduce this with 9, but not with 7.

@dhalbert has already identified one specific place where code changed and made a problem (volatile is now needed to get the same result); this may be some other thing.

Perhaps we should consider reverting to the older compiler at this time. @tannewt thoughts?

interesting -- That explains why my CPB experience is different. It was build with the old compiler.

@dhalbert
Copy link
Collaborator Author

I am willing to try to figure this out. It probably reflects a real bug. Importantly, we should note these fixes in MicroPython for gcc 9 issues:

micropython#4844
micropython#5008

@tannewt
Copy link
Member

tannewt commented Dec 12, 2019

Ok, I reproduced it with an optimized build on nRF. The stack trace isn't helpful:

Breakpoint 1, 0x000292fa in reset_into_safe_mode ()
(gdb) bt
#0  0x000292fa in reset_into_safe_mode ()
#1  0x0002a3fc in softdevice_assert_handler ()
#2  0x00024a44 in ?? ()

I'm cherry picking the commits from micropython#5008 now.

@tannewt
Copy link
Member

tannewt commented Dec 12, 2019

The commit from micropython#4844 fixes this.

@kevinjwalters
Copy link

Glad to hear this is fixed, I just noticed it on Adafruit CircuitPython 5.0.0-beta.1 on 2019-12-10; Adafruit Circuit Playground Bluefruit with nRF52840

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

Successfully merging a pull request may close this issue.

5 participants