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

TLS Failing since commit 63c7e5f7bfb886c6ce4318d744e0191f78a77204 #12031

Closed
9 of 14 tasks
ksaye opened this issue May 6, 2021 · 7 comments · Fixed by #12063
Closed
9 of 14 tasks

TLS Failing since commit 63c7e5f7bfb886c6ce4318d744e0191f78a77204 #12031

ksaye opened this issue May 6, 2021 · 7 comments · Fixed by #12063
Labels
bug Type - Confirmated Bug fixed Result - The work on the issue has ended

Comments

@ksaye
Copy link

ksaye commented May 6, 2021

PROBLEM DESCRIPTION

Ever since the TLS changes in 63c7e5f, it fails on NodeMCU.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in discussions
  • Searched the problem in the docs
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): _NodeMCU ESP8266EX _
  • Tasmota binary firmware version number used: 9.4.0.3_
    • Pre-compiled
    • Self-compiled
  • Flashing tools used: Visual Studio Code___
  • Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:

  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:

  • Provide the output of this command: Status 0:
  STATUS 0 output here:

  • Set weblog to 4 and then, when you experience your issue, provide the output of the Console log:
  Console output here:

TO REPRODUCE

  1. Clone the repo
  2. change to the Tasmota directory
  3. Run the command Git checkout -f 63c7e5f7bfb886c6ce4318d744e0191f78a77204
  4. Add the #define USE_MQTT_TLS to your user_config_override.h file
  5. Compile and flash your NodeMCU
  6. Configure the WiFi
  7. Go into Configuration --> Configure MQTT --> Define an MQTT Host, select use TSL, set the port to 8883 and configure userid and password.
  8. After it reboots, you will see a similar message below:
00:00:00.002 HDW: ESP8266EX
00:00:00.050 CFG: Loaded from flash at FA, Count 10
00:00:00.055 FRC: Some settings have been reset (2)
00:00:00.062 Project tasmota Tasmota Version 9.4.0.3(tasmota)-2_7_4_9(2021-05-06T16:03:24)
00:00:00.551 WIF: Connecting to AP1 iotdevices Channel 3 BSSId FE:92:BF:64:58:1E in mode 11n as tasmota_126366-0870...
00:00:01.754 WIF: Connected
00:00:02.005 HTP: Web server active on tasmota_126366-0870 with IP address 192.168.15.45
22:09:31.035 MQT: Attempting connection...

User exception (panic/abort/assert)
--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Abort called

>>>stack>>>

ctx: sys
sp: 3fff7d88 end: 3fffffb0 offset: 0000
3fff7d88:  3fff679c 00000100 3fff4248 deadbeef
3fff7d98:  000000fe 00000000 00000000 00000000
3fff7da8:  00000000 00000000 00000000 00000000  
3fff7db8:  00000000 3fff4a58 deadbeef 003c3879
3fff7dc8:  00000008 00000000 3fff4264 402491fe
3fff7dd8:  00000008 00000000 3fff4264 40249210
3fff7de8:  00000074 deadbeef deadbeef 4023e08c  
3fff7df8:  deadbeef 00000000 3fff4264 4023d0bc
3fff7e08:  deadbeef 722d6e69 07b091b0 00000651
3fff7e18:  3fff7e5a 05b40805 01004080 12a620a0  
3fff7e28:  d1646663 4d1c1754 00450008 0995dc05
3fff7e38:  06710040 590d4eaa a8c095e7 22b32d0f
3fff7e48:  2195f858 19e3113c 10500000 ff77fa7c  
3fff7e58:  3a700000 77772f2f 696d2e77 736f7263
3fff7e68:  2e74666f 2f6d6f63 2f696b70 6f63736d
3fff7e78:  632f7072 08307370 81670606 0102010c
3fff7e88:  03061f30 04231d55 80163018 7f2fff14  
3fff7e98:  38f406e1 25ed2df3 fec2988d fc6cf60e
3fff7ea8:  061d30fa 251d5503 14301604 062b0806
3fff7eb8:  07050501 08060103 0501062b 02030705  
3fff7ec8:  09060d30 8648862a 01010df7 0300050b
3fff7ed8:  00010282 06e3f435 72862173 c544e0d8
3fff7ee8:  34936522 ffc48f27 9b4d189d d2026f66
3fff7ef8:  1da9d3fc 5c41ca5d fb794794 31852711  
3fff7f08:  163cc777 01b74b56 587ee2e1 32c1d744
3fff7f18:  551ac347 5fc6692a c18c884d 0fdd68a5
3fff7f28:  6ef69e96 3abfcb71 645d7234 9a06c2b2  
3fff7f38:  d6e65217 4cb6b2f6 3da25f4e cc167923
3fff7f48:  873154bc 52c3252a a326fa27 7d42648d
3fff7f58:  1ea12612 d3ea5e80 0868c013 c7d1fb93  
3fff7f68:  fc8b8662 19d1086c 5bf7d768 5c2cbc45
3fff7f78:  9b1f610d b8c1cf57 a80a65e3 f299a5c8
3fff7f88:  93e2825a 64efb5cf 6b46ade4 013d2e61
3fff7f98:  331324b4 9848c47c a32abc91 3258de59  
3fff7fa8:  11f3b274 cf84ac43 16d89fcd 0e219b7a
3fff7fb8:  bbf4b25b a3795cb8 2ce8d624 06c3b07e
3fff7fc8:  c2a05336 0a401b52 7bae7483 afcfffb6  
3fff7fd8:  e4525c6e ddbce00a 18f8eb33 b80a7166
3fff7fe8:  2ee3adfa d1d390b2 18e890c4 3e36e4f4
3fff7ff8:  ae6d6d56 4012b72d a72464c9 ec938d3a
3fff8008:  4af5d529 9b5b61c2 3b7bbcab 3e1e3fa3  
3fff8018:  f47e716a e20dc11e c74640ca b2463805
3fff8028:  e592d9a0 dff3d83b 9b5785f2 45d2f2b3
3fff8038:  2a82e1e7 5648178b 39a8945a 2ec3faa9  
3fff8048:  e0cea037 1b0065d7 ae14123a 435161c0
3fff8058:  9ee08eb0 ea90abf1 bfc19d2e d07cee19
3fff8068:  ce2a5bca 328bc99b 22345088 3492636d  
3fff8078:  36bc809b 49700ca3 975f39ab 651430d0
3fff8088:  601d8318 8a427478 5f53aecf a444a997
3fff8098:  fa6a0eaf c505e9c7 a38c5018 86715216
3fff80a8:  549ed6f9 19d77d2d 04144e40 e865812a  
3fff80b8:  bc5cbf50 c1106c65 1105c81f c1bc2527
3fff80c8:  22a9f21c e210cd3d 328a190f f1a00edf
3fff80d8:  aa018581 305e0500 305a0582 a0420482  
3fff80e8:  02010203 a70f1002 3dc52247 580fc888
3fff80f8:  9d1ffb9e 0d303a4a 862a0906 0df78648
3fff8108:  050b0101 315a3000 0609300b 06045503  
3fff8118:  45490213 10301231 04550306 4209130a
3fff8128:  69746c61 65726f6d 11301331 04550306
3fff8138:  430a130b 72656279 73757254 30223174
3fff8148:  55030620 19130304 746c6142 726f6d69  
3fff8158:  79432065 54726562 74737572 6f6f5220
3fff8168:  171e3074 3030320d 32313237 30303033
3fff8178:  0d175a30 30313432 37303830 30303030  
3fff8188:  314f305a 0609300b 06045503 53550213
3fff8198:  1c301e31 04550306 4d15130a 6f726369
3fff81a8:  74666f73 726f4320 61726f70 6e6f6974  
3fff81b8:  1e302031 04550306 4d171303 6f726369
3fff81c8:  74666f73 41535220 534c5420 20414320
3fff81d8:  82303230 0d302202 862a0906 0df78648
3fff81e8:  05010101 02820300 8230000f 82020a02  
3fff81f8:  f4000102 aa5919c0 067c242a eed13121
3fff8208:  6a81f512 d1f6e394 5de32f4a 14292eb1
3fff8218:  95ccbc38 d107295d f4375df8 3fb4d720  
3fff8228:  927a3a58 fa3c8fee 03720a2b ebd4409e
3fff8238:  98f68e8b ddf0e7f9 f4253cef 5684336c
3fff8248:  9391a74f f30d0448 1ac69b02 38d1f80f  
3fff8258:  00c9ef6f 329b1897 a8296c2a 07ea6e5d
3fff8268:  e1812307 d7a25899 ceff8501 e6fa476d
3fff8278:  737d9140 8aa34211 924b465a 7d3e4f29
3fff8288:  398391f3 235e7c18 54670d83 281128a8  
3fff8298:  fe84ad1d 0505f0e0 38d66971 17561649
3fff82a8:  04ec1d13 b3802372 373829d6 b0007a66
3fff82b8:  c0f831f7 c2034180 0fcb2789 f8fa1a53  
3fff82c8:  65c0e63e 5de794da 68b03473 d8abf66a
3fff82d8:  5d4e15e0 fed87513 9d5b0844 2acf7f7d
3fff82e8:  9fe8936a 0a77e7bf c36b8308 6e8dbe1b
3fff82f8:  b9270fd9 55296b40 23a14726 0edd5f91  
3fff8308:  a5512cb2 ff7be33a 13ee9f5a d80d4bbc
3fff8318:  65bae642 3622db2b c4842856 24b028cc
3fff8328:  585e158f 3e429b15 242712d1 fb5c2a21  
3fff8338:  7c8b302a 65eeac94 2a40030a 0f638db0
3fff8348:  2ff001b0 7a0e5984 43eae6a3 d581d4f8
3fff8358:  34465b5d 07a2d42f 22a5881d f479f347
3fff8368:  ea07d887 069ebf36 6dae6f31 8806b720  
3fff8378:  68b8154b e55986fe 8694ae7c 709aef4a
3fff8388:  b89a794c 97131e22 afd85325 4f0fbca4
3fff8398:  59d15b1f 29e0f7e8 81c55a12 82fd34d6  
3fff83a8:  9fa1e399 b5bde08c 95db06ae ac62d549
3fff83b8:  b78b6532 0c7eab3c 6a8a621b db7b97b9
3fff83c8:  9b76c587 2ff2c5ec dd666e30 134e6451  
3fff83d8:  adc3ceaa 7f1437b4 cda81323 2d7e6aa9
3fff83e8:  bb7c6ec4 c8d04913 0275d3d1 53d14211
3fff83f8:  029f8cea 01000103 250182a3 21018230
3fff8408:  03061d30 00001d55 09730af5 0673073f
3fff8418:  00000000 00000000 0a330af5 3fff7e14
3fff8428:  3fff846a 05b40db9 01004080 12a620a0
3fff8438:  d1646663 4d1c1754 00450008 0895dc05  
3fff8448:  06710040 590d4faa a8c095e7 22b32d0f
3fff8458:  1be1f858 19e3113c 10500000 cb2dfa7c
3fff8468:  03160000 02b40d03 034d0000 5b946003  
3fff8478:  495d830b f08a65f4 4b1f51f8 424a92e7
3fff8488:  818ea236 49f5762a 8252ec2a 4239203b
3fff8498:  aa760000 0a4b8893 a8ace368 6fcd224d
3fff84a8:  88a27547 819f5280 8e86850d 9c001e28  
3fff84b8:  ff050000 00010001 3d0d000b 003a0d00
3fff84c8:  8230d607 8230d207 03a0ba05 02020102
3fff84d8:  02007f13 95294b87 c3927c5b 00009a42  
3fff84e8:  4b870200 09060d30 8648862a 01010df7
3fff84f8:  3000050b 300b314f 55030609 02130604
3fff8508:  1e315355 03061c30 130a0455 63694d15
3fff8518:  6f736f72 43207466 6f70726f 69746172
3fff8528:  20316e6f 03061e30 13030455 63694d17
3fff8538:  6f736f72 52207466 54204153 4320534c
3fff8548:  32302041 0d171e30 31313032 37313930  
3fff8558:  39323633 320d175a 30313131 33373139
3fff8568:  5a393236 1c311e30 03061a30 0c030455
3fff8578:  612e2a13 6572757a 7665642d 73656369  
3fff8588:  74656e2e 22018230 09060d30 8648862a
3fff8598:  01010df7 03000501 000f0182 0a018230
3fff85a8:  01018202 4cffcf00 b6c88f64 874d9340
3fff85b8:  542eb647 887d64fd 83780684 c36bc9cf
3fff85c8:  5d2341c9 c7ebb30a a2085d9a c765d89d
3fff85d8:  4dd4ac1d ed4276ab b6989775 39a47db7
3fff85e8:  de53dd64 3f0046fe 7d380fe1 564c9a22  
3fff85f8:  84a50294 3214558d 8c748f8b 24380474
3fff8608:  de9ff1f5 a3abc97b 7c35e96a f216dac4
3fff8618:  0b4f7c10 a671c67d 82bd2f73 06b96dba  
3fff8628:  bf17c4da d6013f30 16876352 15a9d960
3fff8638:  71912058 9017bb10 33233465 09b16cf1
3fff8648:  ac464e60 553d85fe 6e8b4078 1e11bf3a
3fff8658:  cdd95f62 ab477bc5 ab985a08 905f73a1
3fff8668:  e9654f83 176c39cd 2d853a1e 2d99ea1b
3fff8678:  06ac028a df154f88 e3835639 cd524433
3fff8688:  1776c6f6 7b5b4817 b915d622 51224cc8  
3fff8698:  7ebc1f51 f0c83802 179dbb37 d32dcee3
3fff86a8:  ddae452f 0103024d 82a30100 8230d603
3fff86b8:  8230d203 0a060401 0401062b 0279d601  
3fff86c8:  81040204 f28104f5 7600f000 f23e7d00
3fff86d8:  88ff8ff8 c2246855 529ecac0 c52b7989
3fff86e8:  7f09780e 68976a2e f0227e99 010000d7
3fff86f8:  dc1dae75 0400006a 30470003 00210245  
3fff8708:  a68637d9 78c2484b 65ff1d3e 0dc4b68d
3fff8718:  84792a8d 0dd03a61 8c0fd3f2 bdfc9c54
3fff8728:  ea342002 488c82dd fe82a05a 0efcb4d0  
3fff8738:  196195f4 d034cf15 302fd609 1aa5707e
3fff8748:  7600abd1 43dc5c00 abe6fe92 5eb14445
3fff8758:  e656d49a d5fb3710 a1dc47fa 5eb29473  
3fff8768:  0ec7f6e6 010000ca de1dae75 040000f3
3fff8778:  30470003 42200245 00aa0c11 96857332
3fff8788:  650bca92 3250a981 e7e1663e 156e4e00
3fff8798:  523738bc 02bed5da 69e40021 b9a46e62  
3fff87a8:  17177afe adc41561 1ff39d10 e39ecd13
3fff87b8:  3cebdd4d 5efad5d5 2730e84a 062b0906
3fff87c8:  82010401 040a1537 3018301a 2b08060a  
3fff87d8:  05050106 30010307 2b08060a 05050106
3fff87e8:  30020307 2b09063e 01040106 07153782
3fff87f8:  2f303104 062b2706 82010401 87081537  
3fff8808:  837586da 8201d9ee 811b85c9 85619eb5
3fff8818:  8160ebf4 8e86855d 98c28741 64010250
3fff8828:  30250102 08068781 0501062b 01010705
3fff8838:  79307b04 08065330 0501062b 02300705  
3fff8848:  74684786 2f3a7074 7777772f 63696d2e
3fff8858:  6f736f72 632e7466 702f6d6f 6d2f696b
3fff8868:  726f6373 694d2f70 736f7263 2574666f  
3fff8878:  53523032 30322541 25534c54 41433032
3fff8888:  30303225 72632e32 06223074 01062b08
3fff8898:  30070505 68168601 3a707474 636f2f2f  
3fff88a8:  6d2e7073 73636f73 6f632e70 061d306d
3fff88b8:  0e1d5503 14041604 d46622ce 8430106a
3fff88c8:  8a7bb4ee 2f922b0f 1a8c7297 03060b30
3fff88d8:  040f1d55 04020304 065d30b0 111d5503  
3fff88e8:  54305604 2e2a1382 72757a61 65642d65
3fff88f8:  65636976 656e2e73 2a1a8274 716d612e
3fff8908:  2e737770 72757a61 65642d65 65636976  
3fff8918:  656e2e73 2a218274 2e75732e 616e616d
3fff8928:  656d6567 612d746e 6572757a 7665642d
3fff8938:  73656369 74656e2e 06b08130 1f1d5503  
3fff8948:  30a88104 8130a581 9f81a0a2 869c81a0
3fff8958:  7474684d 2f2f3a70 7263736d 696d2e6c
3fff8968:  736f7263 2e74666f 2f6d6f63 2f696b70
3fff8978:  6f63736d 632f7072 4d2f6c72 6f726369  
3fff8988:  74666f73 52303225 32254153 534c5430
3fff8998:  43303225 30322541 632e3230 4b866c72
3fff89a8:  70747468 632f2f3a 6d2e6c72 6f726369  
3fff89b8:  74666f73 6d6f632e 696b702f 63736d2f
3fff89c8:  2f70726f 2f6c7263 7263694d 666f736f
3fff89d8:  30322574 25415352 4c543032 30322553
3fff89e8:  32254143 2e323030 306c7263 55030657  
3fff89f8:  5004201d 42304e30 062b0906 82010401
3fff8a08:  30012a37 06333035 01062b08 02070505
3fff8a18:  68271601 00007474 097311b0 00000000  
3fff8a28:  3fff8a6a 02510251 01004180 12a620a0
3fff8a38:  d1646663 4d1c1754 00450008 0a957902
3fff8a48:  06710040 590db0ad a8c095e7 22b32d0f
3fff8a58:  2749f858 19e3113c 18500000 fe49fa7c
3fff8a68:  040e0000 ff140416 06e17f2f 2df338f4
3fff8a78:  988d25ed f60efec2 30fafc6c 5503061f
3fff8a88:  1804231d 14801630 30599de5 cc584782  
3fff8a98:  5408faac 3a7b8636 f04d04b5 03060e30
3fff8aa8:  010f1d55 0404ff01 86010203 03061d30
3fff8ab8:  04251d55 06143016 01062b08 03070505  
3fff8ac8:  2b080601 05050106 30020307 55030612
3fff8ad8:  0101131d 300804ff ff010106 30000102
3fff8ae8:  2b080634 05050106 04010107 30263028
3fff8af8:  2b080624 05050106 86013007 74746818  
3fff8b08:  2f2f3a70 7073636f 6769642e 72656369
3fff8b18:  6f632e74 063a306d 1f1d5503 31303304
3fff8b28:  2da02f30 29862ba0 70747468 632f2f3a  
3fff8b38:  2e336c72 69676964 74726563 6d6f632e
3fff8b48:  6e6d4f2f 6f6f7269 32303274 72632e35
3fff8b58:  062a306c 201d5503 21302304 06060830
3fff8b68:  010c8167 08300102 81670606 0202010c
3fff8b78:  09060b30 0401062b 2a378201 060d3001
3fff8b88:  48862a09 010df786 00050b01 01018203
3fff8b98:  ddd9a000 35d4e57a 20b474b4 e8b837df  
3fff8ba8:  5e984bb8 fb311b2e 0b3bc835 02fc9e71
3fff8bb8:  df89d359 a1414b01 8c067243 52fddeb4
3fff8bc8:  52150833 d9d07914 94dacb06 a9fbf1a9  
3fff8bd8:  d5cfb476 c800861f edfaf1d3 231d154b
3fff8be8:  4129f6a0 8935db82 6e43761e 05841985
3fff8bf8:  3eaa0feb bc3e0f1a 7c3a3264 3db2769f
3fff8c08:  2fc4d7aa 43794225 0bf0f63e ade614ed  
3fff8c18:  2be008f8 f6a8c543 94f80204 d87abd2a
3fff8c28:  925d75d0 b2ab7f71 9c253522 d111146e
3fff8c38:  61a752df e27c4497 82ad2d63 f3c4920d  
3fff8c48:  60076b43 1a121fcf e5d40a88 fceb1271
3fff8c58:  a3512b51 b8de7bd4 4ae27cf2 a1a83470
3fff8c68:  6a46adfb 991ff23f d6583eba 416d6452
3fff8c78:  96a1036e 55dbb94f a1c835be bd5b74dc  
3fff8c88:  b5d04410 d6cb4f98 81e3772a 7cc0b192
3fff8c98:  00000d09 0201031a 04120040 02010501
3fff8ca8:  05030401 02030203 06010602 0e000003  
3fff8cb8:  00000000 00000000 0af511b0 0646057a

EXPECTED BEHAVIOUR

It worked in the prior commit: c398ce7

It continues to fail (has not been fixed) in the current: 3c4acc9

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

@s-hadinger
Copy link
Collaborator

Will take a look

@s-hadinger
Copy link
Collaborator

I can't reproduce. I suspect it's a wrong size for the ThunkStack that causes the crash.

What are your compile options?

@ksaye
Copy link
Author

ksaye commented May 7, 2021

I am surprised you don't see the problem. I can reproduce it every time.

If I compile with the TLS setting and then configure MQTT checking the "USE TLS" box, it saves the settings, reboots and they you see the error above. I am using a nodeMCU ESP12E board.

Is there any debug setting or change I can make to help troubleshoot?

I am using Visual Studio Code on Windows to build. Here is my `platform_override.ini'.

; ***  Example PlatformIO Project Configuration Override File   ***
; ***  Changes done here override settings in platformio.ini    ***
;
; *****************************************************************
; ***  to activate rename this file to platformio_override.ini  ***
; *****************************************************************
;
; Please visit documentation for the options and examples
; http://docs.platformio.org/en/stable/projectconf.html

[platformio]
; For best Gitpod performance remove the ";" in the next line. Needed Platformio files are cached and installed at first run
;core_dir = .platformio
; Custom config Zigbee [env] -> platformio_tasmota_cenv_example.ini
extra_configs = platformio_tasmota_cenv.ini

; *** Build/upload environment
default_envs =
; *** Uncomment the line(s) below to select version(s)
                tasmota
;                tasmota-debug
;                tasmota-ircustom
;                tasmota-minimal
;                tasmota-lite
;                tasmota-knx
;                tasmota-sensors
;                tasmota-display
;                tasmota-zbbridge
;                tasmota-ir
;                tasmota32
;                tasmota32-bluetooth
;                tasmota32-webcam
;                tasmota32-knx
;                tasmota32-sensors
;                tasmota32-display
;                tasmota32-ir
;                tasmota32-ircustom
;                tasmota32solo1
;                tasmota32c3
;                tasmota32s2
;                tasmota32-odroidgo
;                tasmota32-core2


[common]
platform_packages           = ${core.platform_packages}
build_unflags               = ${core.build_unflags}
build_flags                 = ${core.build_flags}
; *** Optional Debug messages
;                            -DDEBUG_TASMOTA_CORE
;                            -DDEBUG_TASMOTA_DRIVER
;                            -DDEBUG_TASMOTA_SENSOR

; *** CAUTION *** This setting is ONLY possible since 12.01.2021 with development version !!!
; *** Enable only if you exactly know what are you doing
; *** If you try with earlier builds a serial erase and flash is probably needed
;
; Build variant 1MB = 1MB firmware no filesystem (default)
;board                       = esp8266_1M
; Build variant 2MB = 1MB firmware, 1MB filesystem (most Shelly devices)
;board                       = esp8266_2M1M
; Build variant 4MB = 1MB firmware, 1MB OTA, 2MB filesystem (WEMOS D1 Mini, NodeMCU, Sonoff POW)
;board                       = esp8266_4M2M

; set CPU frequency to 80MHz (default) or 160MHz
;board_build.f_cpu           = 160000000L

; set Flash chip frequency to 40MHz (default), 20MHz, 26Mhz, 80Mhz
;board_build.f_flash         = 20000000L
;board_build.f_flash         = 26000000L
;board_build.f_flash         = 80000000L

; *** Upload Serial reset method for Wemos and NodeMCU
upload_port                 = COM7

extra_scripts               = ${scripts_defaults.extra_scripts}
;                              pio-tools/obj-dump.py

lib_extra_dirs              = ${library.lib_extra_dirs}

[core]
; Activate only (one set) if you want to override the standard core defined in platformio.ini !!!

;platform_packages           = ${tasmota_stage.platform_packages}
;build_unflags               = ${tasmota_stage.build_unflags}
;build_flags                 = ${tasmota_stage.build_flags}

;platform_packages           = ${core_stage.platform_packages}
;build_unflags               = ${core_stage.build_unflags}
;build_flags                 = ${core_stage.build_flags}


[tasmota_stage]
; *** Esp8266 core for Arduino version Tasmota stage. Backport for PWM selection
platform_packages           = tasmota/framework-arduinoespressif8266 @ ~2.7.4
build_unflags               = ${esp_defaults.build_unflags}
build_flags                 = ${esp82xx_defaults.build_flags}
; *** Use ONE of the two PWM variants. Tasmota default is Locked PWM
                              ;-DWAVEFORM_LOCKED_PHASE
                              -DWAVEFORM_LOCKED_PWM

[core_stage]
; *** Esp8266 core for Arduino version stage
platform_packages           = framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
; *** Use Xtensa build chain 10.2. GNU23 from https://github.com/earlephilhower/esp-quick-toolchain
                              tasmota/toolchain-xtensa @ 5.100200.210303
build_unflags               = ${esp_defaults.build_unflags}
                              -Wswitch-unreachable
build_flags                 = ${esp82xx_defaults.build_flags}
; *** Use ONE of the two PWM variants. Tasmota default is Locked PWM
                              ;-DWAVEFORM_LOCKED_PHASE
                              -DWAVEFORM_LOCKED_PWM
                              -Wno-switch-unreachable

[common32]
platform_packages           = ${core32.platform_packages}
build_unflags               = ${core32.build_unflags}
build_flags                 = ${core32.build_flags}
upload_port                 = COM7
lib_extra_dirs              = ${library.lib_extra_dirs}
; *** ESP32 lib. ALWAYS needed for ESP32 !!!
                              lib/libesp32
; *** comment the following line if you dont use LVGL in a Tasmota32 build. Reduces compile time
                              lib/libesp32_lvgl
; *** comment the following line if you dont use Bluetooth or Apple Homekit in a Tasmota32 build. Reduces compile time
                              lib/libesp32_div
; *** uncomment the following line if you dont use Epaper driver epidy in your Tasmota32 build. Reduces compile time 
                              lib/libesp32_epdiy

[core32]
; Activate Stage Core32 by removing ";" in next 3 lines, if you want to override the standard core32
;platform_packages           = ${core32_stage.platform_packages}
;build_unflags               = ${core32_stage.build_unflags}
;build_flags                 = ${core32_stage.build_flags}

[core32_stage]
platform_packages           = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
                              platformio/tool-mklittlefs @ ~1.203.200522
build_unflags               = ${esp32_defaults.build_unflags}
build_flags                 = ${esp32_defaults.build_flags}
                              -DESP32_STAGE=true

[library]
shared_libdeps_dir          = lib
; *** Library disable / enable for variant Tasmota(32). Disable reduces compile time
; *** !!! Disabling needed libs will generate compile errors !!!
; *** The resulting firmware will NOT be different if you leave all libs enabled
; *** Disabling by putting a ";" in front of the lib name
; *** If you dont know what it is all about, do not change
lib_extra_dirs              =
; *** Only disabled for Tasmota minimal and Tasmota light. For all other variants needed!
                              lib/lib_basic
; **** I2C devices. Most sensors. Disable only if you dont have ANY I2C device enabled
                              lib/lib_i2c
; *** Displays. Disable if you dont have any Display activated
                              lib/lib_display
; *** Bear SSL and base64. Disable if you dont have SSL or TLS activated
                              lib/lib_ssl
; *** Audio needs a lot of time to compile. Mostly not used functions. Recommended to disable
                              lib/lib_audio
; *** RF 433 stuff (not RF Bridge). Recommended to disable
                              lib/lib_rf
; *** Mostly not used functions. Recommended to disable
                              lib/lib_div

@s-hadinger
Copy link
Collaborator

s-hadinger commented May 8, 2021

Can you try to raise all values of '_stackSize' to 5300/4 here:

#if defined(USE_MQTT_AWS_IOT)

I suspect that the configuration is not well detected and a stack size too short would lead to a crash

If it works, can you report the stack used from the logs?

@ksaye
Copy link
Author

ksaye commented May 8, 2021

That was it! It looks like the stack was just a little under the limit, as shown by the info below

15:32:01.024 MQT: Attempting connection...
15:32:01.668 MQT: TLS connected in 641 ms, max ThunkStack used 3700
15:32:01.669 MQT: MFLN not supported by TLS server
15:32:01.670 MQT: Connected

I will submit a small PR to address my use case.

@ksaye ksaye closed this as completed May 8, 2021
ksaye added a commit to ksaye/Tasmota that referenced this issue May 8, 2021
@ascillato2 ascillato2 added bug Type - Confirmated Bug fixed Result - The work on the issue has ended labels May 8, 2021
@ca-wo
Copy link

ca-wo commented May 9, 2021

Sorry for bothering, but if using TLS with fingerprint, the stacksize of 3600 (line 49) in my case was to low either. So the value in the else case should also be raised.

As you can see, my Thucksize used is:

08:17:43.006 MQT: Attempting connection... 08:17:43.332 MQT: TLS connected in 323 ms, max ThunkStack used 3684 08:17:43.333 MQT: Fingerprint learned: 55 ......... 08:17:43.408 MQT: Connected

I don't know, what the ideal value could be, in my case it is 3700
Maybe this helps any further

s-hadinger added a commit to s-hadinger/Tasmota that referenced this issue May 9, 2021
@s-hadinger
Copy link
Collaborator

Thanks for the feedback, I have raised it to 3800 to have some headroom.

s-hadinger added a commit that referenced this issue May 9, 2021
Increase min stack thunk to 3800 #12031
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type - Confirmated Bug fixed Result - The work on the issue has ended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants