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

jsvLock > 15 assertion due to socket recv callback #885

Closed
tve opened this issue Jul 25, 2016 · 4 comments
Closed

jsvLock > 15 assertion due to socket recv callback #885

tve opened this issue Jul 25, 2016 · 4 comments

Comments

@tve
Copy link
Contributor

tve commented Jul 25, 2016

The attached program hits the assertion on my linux build (must be built without RELEASE=1). See http://forum.espruino.com/comments/13118945/ and the message after it for details. Running the program requires an MQTT server running at the hostname specified in line 90. The crash output looks like this for me (note that I tweaked the ASSERT):

MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
MQTT: test/44 Hello world
>#291[r5,l15] Var trace: ÿ.HttpCC["0"ASSERT(jsvGetLocks(var)>0) FAILED AT src/jsvar.c:616
  #1[r1,l2] Object {
    #2[r1,l2] Name String [1 blocks] "\xFF"      #3[r1,l3] Object {
        #6[r1,l2] Name String [1 blocks] "timers"          #7[r2,l2] Array(2) [
            #339[r1,l2] Name Integer 1              #320[r1,l2] Object {
                #278[r1,l2] Name String [1 blocks] "time"= int 999741
                #311[r1,l2] Name String [1 blocks] "interval"= int 1000000
                #308[r1,l2] Name String [1 blocks] "callback"                  #196[r2,l2] ...

              }
          ]
        #8[r1,l2] Name String [1 blocks] "watches"          #9[r2,l2] Array(0) [ ]
        #11[r1,l2] Name String [1 blocks] "net"          #10[r1,l3] String [1 blocks] "\x00\x00\x00\x00\x00\xFF\xFF\xFF"
        #13[r1,l2] Name String [1 blocks] "history"          #14[r1,l2] Array(7) [
            #15[r1,l2] Name Integer 0              #12[r1,l2] String [1 blocks] "echo(0);"
...
            #317[r1,l2] Name Integer 6              #313[r1,l2] String [1 blocks] "echo(1);"
          ]
        #275[r1,l2] Name String [1 blocks] "modules"          #276[r1,l2] Object {
            #274[r1,l2] Name String [1 blocks] "net"              #277[r1,l2] NativeFunction 0x4270e5 (0) { }
          }
        #282[r1,l2] Name String [1 blocks] "HttpCC"          #283[r1,l3] Array(1) [
            #297[r1,l2] Name Integer 0              #291[r5,l1] ...

          ]
      }
    #30[r1,l2] Name String [1 blocks] "MQTT"      #29[r2,l1] Function {

pingpong.zip

@tve
Copy link
Contributor Author

tve commented Jul 25, 2016

Is there an official linux build that I can verify this issue with?

@gfwilliams
Copy link
Member

There isn't - I think there's a Pi version? I'd be pretty certain it's reproducible though - I'll give it a go.

@gfwilliams
Copy link
Member

Yes - just reproduced...

@gfwilliams
Copy link
Member

Ok, think I've got it. It was to do with binding this in a function and then calling it on something that also had this bound.

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

No branches or pull requests

2 participants