megacmd icon indicating copy to clipboard operation
megacmd copied to clipboard

megacmd error

Open nmartinho opened this issue 11 years ago • 14 comments

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x20 pc=0x10dc0]

goroutine 1 [running]: main.main() /root/megacmd/main.go:52 +0x1c0

goroutine 2 [syscall]: created by runtime.main /build/buildd/golang-1/src/pkg/runtime/proc.c:221

goroutine 3 [syscall]: created by os/signal.init·1 /usr/lib/go/src/pkg/os/signal/signal_unix.go:26 +0x44

nmartinho avatar Oct 11 '13 16:10 nmartinho

How to reproduce ?

t3rm1n4l avatar Nov 06 '13 07:11 t3rm1n4l

I just build-it following the instructions.

My system: Debian wheezy - kernel 3.3.0+ armv7l

nmartinho avatar Nov 10 '13 08:11 nmartinho

Hi,

Same problem with the binary under F19

./megacmd list mega:/

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x20 pc=0x444611]

goroutine 1 [running]: github.com/t3rm1n4l/go-mega.blockDecrypt(0x0, 0x0, 0xc20028cde0, 0x10, 0x12, ...) /home/slakshman/gopath/src/github.com/t3rm1n4l/go-mega/utils.go:179 +0x51 github.com/t3rm1n4l/go-mega.(_Mega).addFSNode(0xc2000885a0, 0xc20028b150, 0x8, 0xc20028b1f0, 0x8, ...) /home/slakshman/gopath/src/github.com/t3rm1n4l/go-mega/mega.go:466 +0x10ae github.com/t3rm1n4l/go-mega.(_Mega).getFileSystem(0xc2000885a0, 0x0, 0x0) /home/slakshman/gopath/src/github.com/t3rm1n4l/go-mega/mega.go:589 +0x362 github.com/t3rm1n4l/go-mega.(_Mega).Login(0xc2000885a0, 0xc2000bb580, 0x10, 0xc2000a67e0, 0x8, ...) /home/slakshman/gopath/src/github.com/t3rm1n4l/go-mega/mega.go:416 +0x4c9 github.com/t3rm1n4l/megacmd/client.(_MegaClient).Login(0xc2000a6850, 0xc2000a6850, 0x0) /home/slakshman/gopath/src/github.com/t3rm1n4l/megacmd/client/client.go:137 +0x4f main.main() /home/slakshman/gopath/src/github.com/t3rm1n4l/megacmd/main.go:115 +0x807

goroutine 2 [syscall]:

goroutine 4 [syscall]: os/signal.loop() /home/slakshman/go/src/pkg/os/signal/signal_unix.go:21 +0x1c created by os/signal.init·1 /home/slakshman/go/src/pkg/os/signal/signal_unix.go:27 +0x2f

goroutine 5 [chan receive]: main.func·002() /home/slakshman/gopath/src/github.com/t3rm1n4l/megacmd/main.go:105 +0xb5 created by main.main /home/slakshman/gopath/src/github.com/t3rm1n4l/megacmd/main.go:108 +0x72e

goroutine 9 [runnable]: net/http.(_persistConn).readLoop(0xc2000e9400) /home/slakshman/go/src/pkg/net/http/transport.go:761 +0x64b created by net/http.(_Transport).dialConn /home/slakshman/go/src/pkg/net/http/transport.go:511 +0x574

goroutine 10 [select]: net/http.(_persistConn).writeLoop(0xc2000e9400) /home/slakshman/go/src/pkg/net/http/transport.go:774 +0x26f created by net/http.(_Transport).dialConn /home/slakshman/go/src/pkg/net/http/transport.go:512 +0x58b

ghost avatar Feb 26 '14 05:02 ghost

Sarath, I had the same error message and found this issue from google. For me the issue was having a special character in my password "%" . It was the last character of the password but I didn't test whether or not that was necessary for reproduction. Normal alphanumeric password works find. Hope that helps! thanks for the tool.

bzwolf avatar Apr 05 '14 21:04 bzwolf

Same issue here. I don't have any out-of-the-ordinary characters in my config; just built it from scratch and used a config file like the example one in README.md.

My system is ubuntu 14.04 x86_64

derabbink avatar May 12 '14 20:05 derabbink

Had similar problem, seems to be a bug in golang. Try compiling golang from sourcecode and try again.

ml- avatar May 12 '14 20:05 ml-

Got something similar but it happened randomly. I uploaded around 5000 photos after this happened so I don't know why.

I builded the binary myself from source (darwin_amd64).

Any clue why this happens? I have tried changing folders

$ megacmd -verbose=1 sync /Users/obfuscated/Documents/_MEGASYNCER4 mega:/_PHOTOS
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0x4b53b]

goroutine 1 [running]:
runtime.panic(0x251f00, 0x53ef79)
    /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/t3rm1n4l/go-mega.blockDecrypt(0x0, 0x0, 0xc2106212a0, 0x20, 0x21, ...)
    /Users/obfuscated/go/src/github.com/t3rm1n4l/go-mega/utils.go:186 +0x4b
github.com/t3rm1n4l/go-mega.(*Mega).addFSNode(0xc21000f640, 0xc2101f8c20, 0x8, 0xc2101f8c30, 0x8, ...)
    /Users/obfuscated/go/src/github.com/t3rm1n4l/go-mega/mega.go:479 +0x12d6
github.com/t3rm1n4l/go-mega.(*Mega).getFileSystem(0xc21000f640, 0x0, 0x0)
    /Users/obfuscated/go/src/github.com/t3rm1n4l/go-mega/mega.go:593 +0x38f
github.com/t3rm1n4l/go-mega.(*Mega).Login(0xc21000f640, 0xc21004a580, 0x15, 0xc210036840, 0x8, ...)
    /Users/obfuscated/go/src/github.com/t3rm1n4l/go-mega/mega.go:420 +0x542
github.com/t3rm1n4l/megacmd/client.(*MegaClient).Login(0xc2100368b0, 0xc2100368b0, 0x0)
    /Users/obfuscated/go/src/github.com/t3rm1n4l/megacmd/client/client.go:137 +0x5d
main.main()
    /Users/obfuscated/go/src/github.com/t3rm1n4l/megacmd/main.go:115 +0x89a

goroutine 3 [syscall]:
os/signal.loop()
    /usr/local/go/src/pkg/os/signal/signal_unix.go:21 +0x1e
created by os/signal.init·1
    /usr/local/go/src/pkg/os/signal/signal_unix.go:27 +0x31

goroutine 4 [syscall]:
runtime.goexit()
    /usr/local/go/src/pkg/runtime/proc.c:1394

goroutine 5 [chan receive]:
main.func·002()
    /Users/obfuscated/go/src/github.com/t3rm1n4l/megacmd/main.go:105 +0xc3
created by main.main
    /Users/obfuscated/go/src/github.com/t3rm1n4l/megacmd/main.go:108 +0x7b2

goroutine 9 [IO wait]:
net.runtime_pollWait(0x640c48, 0x72, 0x0)
    /private/var/folders/00/0sdwh000h01000cxqpysvccm0035qk/T/makerelease023741545/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc210096300, 0x72, 0x63f0c0, 0x23)
    /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc210096300, 0x23, 0x63f0c0)
    /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).Read(0xc2100962a0, 0xc21039e000, 0x8000, 0x8000, 0x0, ...)
    /usr/local/go/src/pkg/net/fd_unix.go:204 +0x2a0
net.(*conn).Read(0xc210000fe8, 0xc21039e000, 0x8000, 0x8000, 0x1, ...)
    /usr/local/go/src/pkg/net/net.go:122 +0xc5
crypto/tls.(*block).readFromUntil(0xc21008f570, 0x640d78, 0xc210000fe8, 0x5, 0xc210000fe8, ...)
    /usr/local/go/src/pkg/crypto/tls/conn.go:459 +0xb6
crypto/tls.(*Conn).readRecord(0xc210051280, 0x17, 0x0, 0x8)
    /usr/local/go/src/pkg/crypto/tls/conn.go:539 +0x107
crypto/tls.(*Conn).Read(0xc210051280, 0xc21016f000, 0x1000, 0x1000, 0x0, ...)
    /usr/local/go/src/pkg/crypto/tls/conn.go:897 +0x135
bufio.(*Reader).fill(0xc2101e3c60)
    /usr/local/go/src/pkg/bufio/bufio.go:91 +0x110
bufio.(*Reader).Peek(0xc2101e3c60, 0x1, 0x0, 0x0, 0x0, ...)
    /usr/local/go/src/pkg/bufio/bufio.go:119 +0xcb
net/http.(*persistConn).readLoop(0xc210057500)
    /usr/local/go/src/pkg/net/http/transport.go:687 +0xb7
created by net/http.(*Transport).dialConn
    /usr/local/go/src/pkg/net/http/transport.go:528 +0x607

goroutine 10 [select]:
net/http.(*persistConn).writeLoop(0xc210057500)
    /usr/local/go/src/pkg/net/http/transport.go:791 +0x271
created by net/http.(*Transport).dialConn
    /usr/local/go/src/pkg/net/http/transport.go:529 +0x61e

yayscripting avatar May 14 '14 11:05 yayscripting

I get this too.

It appeared out-of-the-blue and first I suspected that there were some go runtime update that I didn't notice that broke it. However, there wasn't. I updated to golang 1.3 (OpenSUSE-13.1, 64bit) and recompiled megacmd. Same issue persists not only with uploads but also e.g. list. Every time.

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x20 pc=0x454d0b]

goroutine 16 [running]: runtime.panic(0x6bc7c0, 0x884b53) /usr/local/go/src/pkg/runtime/panic.c:279 +0xf5 github.com/t3rm1n4l/go-mega.blockDecrypt(0x0, 0x0, 0xc208488b40, 0x20, 0x21, 0xc208488b40, 0x20, 0x21, 0x0, 0x0) /home/tri/go/src/github.com/t3rm1n4l/go-mega/utils.go:186 +0x6b github.com/t3rm1n4l/go-mega.(_Mega).addFSNode(0xc2080503c0, 0xc2081d0340, 0x8, 0xc2081d0348, 0x8, 0xc2081d0350, 0xb, 0x0, 0xc2082266c0, 0x40, ...) /home/tri/go/src/github.com/t3rm1n4l/go-mega/mega.go:479 +0x1328 github.com/t3rm1n4l/go-mega.(_Mega).getFileSystem(0xc2080503c0, 0x0, 0x0) /home/tri/go/src/github.com/t3rm1n4l/go-mega/mega.go:593 +0x440 github.com/t3rm1n4l/go-mega.(_Mega).Login(0xc2080503c0, 0xc208044560, 0x19, 0xc208044580, 0x18, 0x0, 0x0) /home/tri/go/src/github.com/t3rm1n4l/go-mega/mega.go:420 +0x5d2 github.com/t3rm1n4l/megacmd/client.(_MegaClient).Login(0xc208000b30, 0x0, 0x0) /home/tri/go/src/github.com/t3rm1n4l/megacmd/client/client.go:137 +0x6f main.main() /home/tri/external/megacmd/main.go:115 +0x872

rinne avatar Jun 26 '14 19:06 rinne

Stack trace shows

github.com/t3rm1n4l/go-mega.blockDecrypt(0x0, 0x0, ...

It smells like wrong, since its:

func blockDecrypt(blk cipher.Block, dst, src []byte)

rinne avatar Jun 26 '14 19:06 rinne

Could you list out some steps on how to reproduce this problem ?

t3rm1n4l avatar Aug 20 '14 16:08 t3rm1n4l

Could you try latest code ?

t3rm1n4l avatar Aug 20 '14 18:08 t3rm1n4l

I tried with the lastest code as of yesterday and the issue still happen randomly... Any thoughts?

pafnow avatar Nov 08 '14 06:11 pafnow

Same issue here (OSX 10.10.2), just trying to list some files... any clue?

alvgarci avatar Apr 17 '15 13:04 alvgarci

(of course last megacmd code)

alvgarci avatar Apr 17 '15 13:04 alvgarci