Page 1 of 1

Sporadic "OSError: -1071239368" on socket sendto (UDP)

Posted: Sun Apr 24, 2016 11:46 am
by kfricke
While implementing my very simple remote syslog client i am running across a strange OSError on my Huzzah feather board. When using the Unix port everything works as intended. Seems to be a LWIP related issue!?

To reproduce the issue, check out the usyslog module, put the syslog*.py files into the scriots folder and run a make deploy to put them as frozen modules onto your ESP board.
My Huzzah does log initially, but throws messages as the following output. They are sporadically triggered by a log method of the UDPClient and last line in the trace is always line 82, the one sending UDP packets.

Code: Select all

>>> import usyslog_test
WLAN Connected:
  Network configuration: ('192.168..', '', '192.168..', '')
Starting syslog tests...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "usyslog_test", line 28, in <module>
  File "usyslog", line 66, in info
  File "usyslog", line 82, in log
OSError: -1071239368
>>> pm open,type:2 0
The last line "pm open,type:2 0" seems to be some output from osdebug(), so i left it in the snippet, in case it is of use.

I am using version "MicroPython v1.7-150-g0d10e53 on 2016-04-24; ESP module with ESP8266". Haven't tried this on my alpha v4 firmware yet, but feel free to try!

(edit: less dramatic topic)

Re: My simple remote syslog client has problems

Posted: Sun Apr 24, 2016 1:17 pm
by kfricke
Further test runs do show the following behavior:
After a hard reset the error occurs in a random call to the log methods while sending an UDO packet. Doing a soft reset yields permanent errors on the first attempt to send an UDP packet... "rinse and repeat".

Re: Sporadic "OSError: -1071239368" on socket sendto (UDP)

Posted: Tue Apr 26, 2016 12:06 pm
by Damien
Try catching and ignoring this error. See ... 295#p10295 for more info.

Re: Sporadic "OSError: -1071239368" on socket sendto (UDP)

Posted: Tue Apr 26, 2016 3:23 pm
by kfricke
Thanks for the hint. Can I ignore catching the exception manually after applying your patch?

Re: Sporadic "OSError: -1071239368" on socket sendto (UDP)

Posted: Tue Apr 26, 2016 9:49 pm
by pfalcon
@kfricke: Yes. Suggestion to catch exception is for early-release-4, if you build from the latest source, it's already fixed.