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

Runtime Panic on arm7 #270

Closed
ppey opened this Issue Mar 23, 2016 · 13 comments

Comments

Projects
None yet
2 participants
@ppey

ppey commented Mar 23, 2016

Wide crashes on odroid c1, arm7.

I use linux odroidc1 3.10.96-1 and go 1.6.
After building and executing Wide, I tried to create a directory using the web IDE.
The web IDE does freeze and the terminal on the ordroid shows the following:

D 2016/03/23 17:41:22 wide.go:171: Conf:
{
"IP": "${ip}",
"Port": "7070",
"Context": "",
"Server": "{IP}:{Port}",
"StaticServer": "",
"LogLevel": "debug",
"Channel": "ws://{IP}:{Port}",
"HTTPSessionMaxAge": 86400,
"StaticResourceVersion": "${time}",
"MaxProcs": 4,
"RuntimeMode": "dev",
"WD": "${pwd}",
"Locale": "en_US",
"Playground": "${home}/playground",
"AllowRegister": true,
"Autocomplete": true
}
D 2016/03/23 17:41:22 wide.go:175: ${pwd} [/home/hannes/go/bin]
D 2016/03/23 17:41:22 wide.go:185: ${user.home} [/home/hannes]
D 2016/03/23 17:41:22 wide.go:212: ${ip} [192.168.178.149]
D 2016/03/23 17:41:22 wide.go:243: ${time} [1458751282906500021]
D 2016/03/23 17:41:23 main.go:90: host [go1.6, linux_arm], cross-compilation [linux_arm]
I 2016/03/23 17:41:23 main.go:187: Wide is running [192.168.178.149:7070]
^[[15~W 2016/03/23 17:41:42 main.go:225: Not found user [hannes]
I 2016/03/23 17:42:17 users.go:395: Created a user [hannes]
D 2016/03/23 17:42:17 main.go:241: User [hannes] has [0] sessions
E 2016/03/23 17:42:19 main.go:284: Session [409471597] not found
E 2016/03/23 17:43:40 panic.go:41: PANIC RECOVERED: runtime error: invalid memory address or nil pointer dereference
/usr/lib/go/src/runtime/asm_arm.s:429 (0x75a24)
call16: CALLFN(·call16, 16)
/usr/lib/go/src/runtime/panic.go:426 (0x46d0c)
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/lib/go/src/runtime/panic.go:45 (0x453dc)
panicmem: panic(memoryError)
/usr/lib/go/src/runtime/sigpanic_unix.go:24 (0x5d3f4)
sigpanic: panicmem()
/home/hannes/go/src/github.com/b3log/wide/file/files.go:336 (0x150dd4)
NewFileHandler: logger.Debugf("Created a dir [%s] by user [%s]", path, wSession.Username)
/home/hannes/go/src/github.com/b3log/wide/main.go:440 (0x16db4)
panicRecover.func1: handler(w, r)
/home/hannes/go/src/github.com/b3log/wide/main.go:431 (0x16d30)
stopwatch.func1: handler(w, r)
/home/hannes/go/src/github.com/b3log/wide/main.go:418 (0x16a58)
i18nLoad.func1: handler(w, r)
/usr/lib/go/src/net/http/server.go:1618 (0xe8f18)
HandlerFunc.ServeHTTP: f(w, r)
/usr/lib/go/src/net/http/server.go:1910 (0xea5c0)
(_ServeMux).ServeHTTP: h.ServeHTTP(w, r)
/usr/lib/go/src/net/http/server.go:2081 (0xeaf3c)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/lib/go/src/net/http/server.go:1472 (0xe7eb0)
(_conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/lib/go/src/runtime/asm_arm.s:990 (0x77e0c)
goexit: MOVW R0, R0 // NOP

Thanks.

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Mar 24, 2016

Member

Which browser are you using?

Member

88250 commented Mar 24, 2016

Which browser are you using?

@ppey

This comment has been minimized.

Show comment
Hide comment
@ppey

ppey Mar 24, 2016

Latest chromium/Firefox, its a fresh arch-linux installation. There is also nothing during go build, which indicates an error on build. I think this might be cause by the using an different architecture.
However, if i run the Wide-Service on my amd64 system, i don't have any issues.

I guess the error is related the this error message:
E 2016/03/23 17:42:19 main.go:284: Session [409471597] not found

ppey commented Mar 24, 2016

Latest chromium/Firefox, its a fresh arch-linux installation. There is also nothing during go build, which indicates an error on build. I think this might be cause by the using an different architecture.
However, if i run the Wide-Service on my amd64 system, i don't have any issues.

I guess the error is related the this error message:
E 2016/03/23 17:42:19 main.go:284: Session [409471597] not found

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Mar 24, 2016

Member

Yes, it caused by the wide-session missing.

Could you watch the network by browser's developer tools?

qq 20160324172032

Member

88250 commented Mar 24, 2016

Yes, it caused by the wide-session missing.

Could you watch the network by browser's developer tools?

qq 20160324172032

@ppey

This comment has been minimized.

Show comment
Hide comment
@ppey

ppey Mar 24, 2016

Yes, I will provide these infos on Monday.
Thanks!

ppey commented Mar 24, 2016

Yes, I will provide these infos on Monday.
Thanks!

@ppey

This comment has been minimized.

Show comment
Hide comment
@ppey

ppey Mar 29, 2016

I ran wide like before and got the following results:

D 2016/03/29 18:54:38 wide.go:171: Conf:
{
"IP": "${ip}",
"Port": "7070",
"Context": "",
"Server": "{IP}:{Port}",
"StaticServer": "",
"LogLevel": "debug",
"Channel": "ws://{IP}:{Port}",
"HTTPSessionMaxAge": 86400,
"StaticResourceVersion": "${time}",
"MaxProcs": 4,
"RuntimeMode": "dev",
"WD": "${pwd}",
"Locale": "en_US",
"Playground": "${home}/playground",
"AllowRegister": true,
"Autocomplete": true
}
D 2016/03/29 18:54:38 wide.go:175: ${pwd} [/home/hannes/go/bin]
D 2016/03/29 18:54:38 wide.go:185: ${user.home} [/home/hannes]
D 2016/03/29 18:54:38 wide.go:212: ${ip} [192.168.178.149]
D 2016/03/29 18:54:38 wide.go:243: ${time} [1459270478767776494]
D 2016/03/29 18:54:38 main.go:90: host [go1.6, linux_arm], cross-compilation [linux_arm]
I 2016/03/29 18:54:38 main.go:187: Wide is running [192.168.178.149:7070]
D 2016/03/29 18:54:47 users.go:208: Created a HTTP session [134020434] for user [hannes]
D 2016/03/29 18:54:47 main.go:241: User [hannes] has [0] sessions
E 2016/03/29 18:54:49 main.go:284: Session [2096256983] not found

websockets

ppey commented Mar 29, 2016

I ran wide like before and got the following results:

D 2016/03/29 18:54:38 wide.go:171: Conf:
{
"IP": "${ip}",
"Port": "7070",
"Context": "",
"Server": "{IP}:{Port}",
"StaticServer": "",
"LogLevel": "debug",
"Channel": "ws://{IP}:{Port}",
"HTTPSessionMaxAge": 86400,
"StaticResourceVersion": "${time}",
"MaxProcs": 4,
"RuntimeMode": "dev",
"WD": "${pwd}",
"Locale": "en_US",
"Playground": "${home}/playground",
"AllowRegister": true,
"Autocomplete": true
}
D 2016/03/29 18:54:38 wide.go:175: ${pwd} [/home/hannes/go/bin]
D 2016/03/29 18:54:38 wide.go:185: ${user.home} [/home/hannes]
D 2016/03/29 18:54:38 wide.go:212: ${ip} [192.168.178.149]
D 2016/03/29 18:54:38 wide.go:243: ${time} [1459270478767776494]
D 2016/03/29 18:54:38 main.go:90: host [go1.6, linux_arm], cross-compilation [linux_arm]
I 2016/03/29 18:54:38 main.go:187: Wide is running [192.168.178.149:7070]
D 2016/03/29 18:54:47 users.go:208: Created a HTTP session [134020434] for user [hannes]
D 2016/03/29 18:54:47 main.go:241: User [hannes] has [0] sessions
E 2016/03/29 18:54:49 main.go:284: Session [2096256983] not found

websockets

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Mar 30, 2016

Member

Please set the LogLevel to "trace" in conf/wide.json and try again, then paste the log info.

Member

88250 commented Mar 30, 2016

Please set the LogLevel to "trace" in conf/wide.json and try again, then paste the log info.

@ppey

This comment has been minimized.

Show comment
Hide comment
@ppey

ppey Apr 6, 2016

Here is the trace. If I have more time , I'll take closer look into it.

image
$ wide
D 2016/04/06 17:11:59 wide.go:171: Conf:
{
"IP": "${ip}",
"Port": "7070",
"Context": "",
"Server": "{IP}:{Port}",
"StaticServer": "",
"LogLevel": "trace",
"Channel": "ws://{IP}:{Port}",
"HTTPSessionMaxAge": 86400,
"StaticResourceVersion": "${time}",
"MaxProcs": 4,
"RuntimeMode": "dev",
"WD": "${pwd}",
"Locale": "en_US",
"Playground": "${home}/playground",
"AllowRegister": true,
"Autocomplete": true
}
D 2016/04/06 17:11:59 wide.go:175: ${pwd} [/home/hannes/go/bin]
D 2016/04/06 17:11:59 wide.go:185: ${user.home} [/home/hannes]
D 2016/04/06 17:11:59 wide.go:212: ${ip} [192.168.178.149]
D 2016/04/06 17:11:59 wide.go:243: ${time} [1459955519989912388]
T 2016/04/06 17:12:00 wide.go:278: go version go1.6 linux/arm
D 2016/04/06 17:12:00 main.go:90: host [go1.6, linux_arm], cross-compilation [linux_arm]
I 2016/04/06 17:12:00 main.go:187: Wide is running [192.168.178.149:7070]
T 2016/04/06 17:12:03 main.go:428: [GET, /login, 6.318034ms]
D 2016/04/06 17:12:28 users.go:208: Created a HTTP session [134020434] for user [hannes]
T 2016/04/06 17:12:28 main.go:428: [POST, /login, 1.96201ms]
D 2016/04/06 17:12:29 main.go:241: User [hannes] has [0] sessions
T 2016/04/06 17:12:29 main.go:428: [GET, /, 248.7603ms]
T 2016/04/06 17:12:31 outputs.go:66: Open a new [Output] with session [677342532], 1
T 2016/04/06 17:12:31 main.go:428: [GET, /output/ws?sid=677342532, 923.005µs]
E 2016/04/06 17:12:31 main.go:284: Session [677342532] not found
T 2016/04/06 17:12:31 main.go:428: [GET, /start?sid=677342532, 4.788025ms]
T 2016/04/06 17:12:31 main.go:428: [GET, /session/ws?sid=677342532, 477.003µs]
T 2016/04/06 17:12:31 main.go:428: [GET, /about, 6.706035ms]
T 2016/04/06 17:12:31 main.go:428: [GET, /preference, 25.223132ms]
T 2016/04/06 17:12:31 main.go:428: [GET, /notification/ws?sid=677342532, 26µs]
T 2016/04/06 17:12:32 main.go:428: [POST, /files, 539.023809ms]
T 2016/04/06 17:12:32 main.go:428: [GET, /notification/ws?sid=677342532, 25µs]
T 2016/04/06 17:12:34 main.go:428: [GET, /notification/ws?sid=677342532, 28µs]
T 2016/04/06 17:12:36 main.go:428: [GET, /notification/ws?sid=677342532, 28µs]
T 2016/04/06 17:12:40 main.go:428: [GET, /notification/ws?sid=677342532, 24.001µs]
T 2016/04/06 17:12:45 files.go:705: Created directory [/home/hannes/hannes/src/312]
E 2016/04/06 17:12:45 panic.go:41: PANIC RECOVERED: runtime error: invalid memory address or nil pointer dereference
/usr/lib/go/src/runtime/asm_arm.s:429 (0x75a24)
call16: CALLFN(·call16, 16)
/usr/lib/go/src/runtime/panic.go:426 (0x46d0c)
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/lib/go/src/runtime/panic.go:45 (0x453dc)
panicmem: panic(memoryError)
/usr/lib/go/src/runtime/sigpanic_unix.go:24 (0x5d3f4)
sigpanic: panicmem()
/home/hannes/go/src/github.com/b3log/wide/file/files.go:336 (0x150dd4)
NewFileHandler: logger.Debugf("Created a dir [%s] by user [%s]", path, wSession.Username)
/home/hannes/go/src/github.com/b3log/wide/main.go:440 (0x16db4)
panicRecover.func1: handler(w, r)
/home/hannes/go/src/github.com/b3log/wide/main.go:431 (0x16d30)
stopwatch.func1: handler(w, r)
/home/hannes/go/src/github.com/b3log/wide/main.go:418 (0x16a58)
i18nLoad.func1: handler(w, r)
/usr/lib/go/src/net/http/server.go:1618 (0xe8f18)
HandlerFunc.ServeHTTP: f(w, r)
/usr/lib/go/src/net/http/server.go:1910 (0xea5c0)
(_ServeMux).ServeHTTP: h.ServeHTTP(w, r)
/usr/lib/go/src/net/http/server.go:2081 (0xeaf3c)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/lib/go/src/net/http/server.go:1472 (0xe7eb0)
(_conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/lib/go/src/runtime/asm_arm.s:990 (0x77e0c)
goexit: MOVW R0, R0 // NOP

T 2016/04/06 17:12:45 main.go:428: [POST, /file/new, 13.997072ms]
T 2016/04/06 17:12:45 main.go:428: [GET, /notification/ws?sid=677342532, 25.001µs]
T 2016/04/06 17:12:52 main.go:428: [GET, /notification/ws?sid=677342532, 26µs]
T 2016/04/06 17:13:01 main.go:428: [POST, /session/save, 359.002µs]
T 2016/04/06 17:13:04 main.go:428: [GET, /notification/ws?sid=677342532, 25µs]
T 2016/04/06 17:13:21 main.go:428: [GET, /notification/ws?sid=677342532, 24µs]
T 2016/04/06 17:13:31 main.go:428: [POST, /session/save, 220.001µs]
T 2016/04/06 17:13:46 main.go:428: [GET, /notification/ws?sid=677342532, 25.001µ

ppey commented Apr 6, 2016

Here is the trace. If I have more time , I'll take closer look into it.

image
$ wide
D 2016/04/06 17:11:59 wide.go:171: Conf:
{
"IP": "${ip}",
"Port": "7070",
"Context": "",
"Server": "{IP}:{Port}",
"StaticServer": "",
"LogLevel": "trace",
"Channel": "ws://{IP}:{Port}",
"HTTPSessionMaxAge": 86400,
"StaticResourceVersion": "${time}",
"MaxProcs": 4,
"RuntimeMode": "dev",
"WD": "${pwd}",
"Locale": "en_US",
"Playground": "${home}/playground",
"AllowRegister": true,
"Autocomplete": true
}
D 2016/04/06 17:11:59 wide.go:175: ${pwd} [/home/hannes/go/bin]
D 2016/04/06 17:11:59 wide.go:185: ${user.home} [/home/hannes]
D 2016/04/06 17:11:59 wide.go:212: ${ip} [192.168.178.149]
D 2016/04/06 17:11:59 wide.go:243: ${time} [1459955519989912388]
T 2016/04/06 17:12:00 wide.go:278: go version go1.6 linux/arm
D 2016/04/06 17:12:00 main.go:90: host [go1.6, linux_arm], cross-compilation [linux_arm]
I 2016/04/06 17:12:00 main.go:187: Wide is running [192.168.178.149:7070]
T 2016/04/06 17:12:03 main.go:428: [GET, /login, 6.318034ms]
D 2016/04/06 17:12:28 users.go:208: Created a HTTP session [134020434] for user [hannes]
T 2016/04/06 17:12:28 main.go:428: [POST, /login, 1.96201ms]
D 2016/04/06 17:12:29 main.go:241: User [hannes] has [0] sessions
T 2016/04/06 17:12:29 main.go:428: [GET, /, 248.7603ms]
T 2016/04/06 17:12:31 outputs.go:66: Open a new [Output] with session [677342532], 1
T 2016/04/06 17:12:31 main.go:428: [GET, /output/ws?sid=677342532, 923.005µs]
E 2016/04/06 17:12:31 main.go:284: Session [677342532] not found
T 2016/04/06 17:12:31 main.go:428: [GET, /start?sid=677342532, 4.788025ms]
T 2016/04/06 17:12:31 main.go:428: [GET, /session/ws?sid=677342532, 477.003µs]
T 2016/04/06 17:12:31 main.go:428: [GET, /about, 6.706035ms]
T 2016/04/06 17:12:31 main.go:428: [GET, /preference, 25.223132ms]
T 2016/04/06 17:12:31 main.go:428: [GET, /notification/ws?sid=677342532, 26µs]
T 2016/04/06 17:12:32 main.go:428: [POST, /files, 539.023809ms]
T 2016/04/06 17:12:32 main.go:428: [GET, /notification/ws?sid=677342532, 25µs]
T 2016/04/06 17:12:34 main.go:428: [GET, /notification/ws?sid=677342532, 28µs]
T 2016/04/06 17:12:36 main.go:428: [GET, /notification/ws?sid=677342532, 28µs]
T 2016/04/06 17:12:40 main.go:428: [GET, /notification/ws?sid=677342532, 24.001µs]
T 2016/04/06 17:12:45 files.go:705: Created directory [/home/hannes/hannes/src/312]
E 2016/04/06 17:12:45 panic.go:41: PANIC RECOVERED: runtime error: invalid memory address or nil pointer dereference
/usr/lib/go/src/runtime/asm_arm.s:429 (0x75a24)
call16: CALLFN(·call16, 16)
/usr/lib/go/src/runtime/panic.go:426 (0x46d0c)
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/lib/go/src/runtime/panic.go:45 (0x453dc)
panicmem: panic(memoryError)
/usr/lib/go/src/runtime/sigpanic_unix.go:24 (0x5d3f4)
sigpanic: panicmem()
/home/hannes/go/src/github.com/b3log/wide/file/files.go:336 (0x150dd4)
NewFileHandler: logger.Debugf("Created a dir [%s] by user [%s]", path, wSession.Username)
/home/hannes/go/src/github.com/b3log/wide/main.go:440 (0x16db4)
panicRecover.func1: handler(w, r)
/home/hannes/go/src/github.com/b3log/wide/main.go:431 (0x16d30)
stopwatch.func1: handler(w, r)
/home/hannes/go/src/github.com/b3log/wide/main.go:418 (0x16a58)
i18nLoad.func1: handler(w, r)
/usr/lib/go/src/net/http/server.go:1618 (0xe8f18)
HandlerFunc.ServeHTTP: f(w, r)
/usr/lib/go/src/net/http/server.go:1910 (0xea5c0)
(_ServeMux).ServeHTTP: h.ServeHTTP(w, r)
/usr/lib/go/src/net/http/server.go:2081 (0xeaf3c)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/lib/go/src/net/http/server.go:1472 (0xe7eb0)
(_conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/lib/go/src/runtime/asm_arm.s:990 (0x77e0c)
goexit: MOVW R0, R0 // NOP

T 2016/04/06 17:12:45 main.go:428: [POST, /file/new, 13.997072ms]
T 2016/04/06 17:12:45 main.go:428: [GET, /notification/ws?sid=677342532, 25.001µs]
T 2016/04/06 17:12:52 main.go:428: [GET, /notification/ws?sid=677342532, 26µs]
T 2016/04/06 17:13:01 main.go:428: [POST, /session/save, 359.002µs]
T 2016/04/06 17:13:04 main.go:428: [GET, /notification/ws?sid=677342532, 25µs]
T 2016/04/06 17:13:21 main.go:428: [GET, /notification/ws?sid=677342532, 24µs]
T 2016/04/06 17:13:31 main.go:428: [POST, /session/save, 220.001µs]
T 2016/04/06 17:13:46 main.go:428: [GET, /notification/ws?sid=677342532, 25.001µ

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Apr 7, 2016

Member

Thank you 👍

Member

88250 commented Apr 7, 2016

Thank you 👍

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 20, 2016

Did that fixed? I need to know because I am thinking to integrate it as a plugin for the web framework which I mantain

ghost commented Apr 20, 2016

Did that fixed? I need to know because I am thinking to integrate it as a plugin for the web framework which I mantain

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Apr 20, 2016

Member

@kataras Not yet. I can't locate it, please give me help if you have time 😄

Member

88250 commented Apr 20, 2016

@kataras Not yet. I can't locate it, please give me help if you have time 😄

@ppey

This comment has been minimized.

Show comment
Hide comment
@ppey

ppey Jun 7, 2016

You can close this issue. The problem was caused by the go compiler and bad arm5/7 code generation. I tested it with current master branch and everything works fine. So just use the comming 1.7 for building wide.

Thanks

ppey commented Jun 7, 2016

You can close this issue. The problem was caused by the go compiler and bad arm5/7 code generation. I tested it with current master branch and everything works fine. So just use the comming 1.7 for building wide.

Thanks

@88250

This comment has been minimized.

Show comment
Hide comment
@88250

88250 Jun 8, 2016

Member

@ppey Thank you!

Member

88250 commented Jun 8, 2016

@ppey Thank you!

@88250 88250 closed this Jun 8, 2016

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 14, 2016

@88250 I saw this too late xD anyway good job!

ghost commented Jun 14, 2016

@88250 I saw this too late xD anyway good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment