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

2.5.0 SPIFFS fatal crash with Illegal Instruction on call to millis() within interrupt handler #5788

Closed
ks12 opened this issue Feb 19, 2019 · 5 comments
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.

Comments

@ks12
Copy link

ks12 commented Feb 19, 2019

Basic Infos

  • [ x] This issue complies with the issue POLICY doc.
  • [ x] I have read the documentation at readthedocs and the issue is not addressed there.
  • [ x] I have tested that the issue is present in current master branch (aka latest git).
  • [ x] I have searched the issue tracker for a similar issue.
  • [ x] If there is a stack dump, I have decoded it.
  • [ x] I have filled out all fields below.

Platform

  • Hardware: ESP 12E on Nodemcu 1.0
  • Core Version: 2.5.0
  • Development Env: Arduino IDE
  • Operating System: Windows

Settings in IDE

  • Module: Nodemcu
  • Flash Mode: qio
  • Flash Size: 4MB/1MB]
  • lwip Variant: v2 Higher Bandwidth (no features)
  • Reset Method: --
  • Flash Frequency: --
  • CPU Frequency: 80Mhz
  • Upload Using: OTA
  • Upload Speed: --

Problem Description

In 2.5.0 core, I am facing recurrent ESP crashes at the millis() line of the code:

void doCnt() // This is an interrupt handler function
{
if ((millis() - CntLMillis) > cntBounce) // << This line of code
{
CntLMillis = millis();
checkCnt = true;
}
}

The crash decode shows that its a Fatal Exception 0 - Illegal Command.
millis() is the only command on that line.
The stack shows a lot of SPIFFS activity then a esp_yield and then this crash.

I think it has something to do with interrupt handling along with SPIFFS activity. I cannot stop my interrupt captures during SPIFFS writes, due to application requirements.

I upgraded from the 2.4.2 core to 2.5.0.
My same sketch was very stable in the older core.

After I shifted to the older code, things are stable again.

@devyte
Copy link
Collaborator

devyte commented Feb 19, 2019

The issue template requires a MCVE sketch to reproduce the issue. Without that, it is unlikely this will be looked at.
Please provide a minimal sketch.

@devyte devyte added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Feb 19, 2019
@faparo
Copy link

faparo commented Mar 1, 2019

Hi devyte, i have the same problem. From one day to the next my sketch stopped working.
The description of the cause is the same as described by ks12:

"Fatal Exception 0 - Illegal Command.
millis() is the only command on that line.
The stack shows a lot of SPIFFS activity then a esp_yield and then this crash.".

If, within my sketch, I comment SPIFFS.begin () the program does not crash, the FS also stops working too.
I´m using Platformio/arduino IDE.
I´m new in this, veryyyy new but if you explain to me that it is an "MCVE sketch",
I promise to help to the best of my ability.

@faparo
Copy link

faparo commented Mar 1, 2019

Hi devyte, it´s me again.
i found it "MCVE sketch: Minimial Complete Verifiable Example."
i will try to provide you the MCVE.

@laercionit
Copy link
Contributor

I have the same problem.

@earlephilhower
Copy link
Collaborator

The bug has been oven for >6 months and no MCVE or even a decoded stack trace are available. There's nothing we can look at here. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

5 participants