M5Cardputer icon indicating copy to clipboard operation
M5Cardputer copied to clipboard

SSH Client crashing due to stack overflow (I think?)

Open chexo3 opened this issue 2 years ago • 5 comments

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x40378c14
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a80
entry 0x403c98d0
Starting Setup
.
WiFi Connected
Guru Meditation Error: Core  0 panic'ed (Unhandled debug exception). 
Debug exception reason: Stack canary watchpoint triggered (IDLE) 
Core  0 register dump:
PC      : 0x4038260b  PS      : 0x00060036  A0      : 0x8202aa01  A1      : 0x3fcf4e40  
A2      : 0x9c400000  A3      : 0x00038000  A4      : 0x9c400000  A5      : 0x00000000  
A6      : 0x3fc9e1f0  A7      : 0x00000000  A8      : 0x6001f000  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x00000008  A13     : 0x3fcf4e78  
A14     : 0x4202a248  A15     : 0x00000000  SAR     : 0x00000020  EXCCAUSE: 0x00000001  
EXCVADDR: 0xb33fffff  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0xffffffff  


Backtrace: 0x40382608:0x3fcf4e40 0x4202a9fe:0x3fcf4e70 0x4202aa55:0x3fcf4ea0 0x4202aeee:0x3fcf4f10 0x403774cd:0x3fcf4f60 0x40378714:0x3fcf4f80 0x42029e0d:0x3fcf5040 0x4202a215:0x3fcf5060 0x4202a24b:0x3fcf5090 0x4202a6fe:0x3fcf50b0 0x4037e508:0x3fcf50d0




ELF file SHA256: a626895e93aa9f94

Rebooting...

Here's the output from my serial log. At first I thought it was an issue with the length of the password for one of the servers I connected to, that it was too long. But even connecting to another host with a single character password, it still crashed. I don't know how to interpret this backtrace/stacktrace, so I'm hoping y'all have some idea what I'm doing wrong.

chexo3 avatar Jan 27 '24 22:01 chexo3

Same here

mphaan avatar Jan 29 '24 20:01 mphaan

Same here

I looked in the source code, it seems like they took the example from this repo: https://github.com/aat440hz/SSHClient-M5Cardputer

So I'm going to try the newest code from there and make an issue there if it doesn't work.

chexo3 avatar Jan 30 '24 20:01 chexo3

Beware of the "error" thats in that code. I am no expert but replacing the " with > made compiling better. It did not change the endresult though. #include <WiFi.h> #include <M5Cardputer.h> #include "libssh_esp32.h" #include <libssh/libssh.h>

Than again, I am a complete noob regarding code, I just do SQL. Thank you for your effort. I am hopeful.

mphaan avatar Jan 31 '24 17:01 mphaan

What do you mean made compiling better? I never had compilation errors.

chexo3 avatar Feb 01 '24 02:02 chexo3

Red lines if #include "libssh_esp32.h" was used. No red lines when #include <libssh_esp32.h> was used.

mphaan avatar Feb 02 '24 23:02 mphaan

Please refer to this issue

TinyuZhao avatar Jun 20 '24 10:06 TinyuZhao