Skip to content

Instantly share code, notes, and snippets.

@eloycoto
Created January 6, 2015 10:14
Show Gist options
  • Save eloycoto/549c0923c98eb2442321 to your computer and use it in GitHub Desktop.
Save eloycoto/549c0923c98eb2442321 to your computer and use it in GitHub Desktop.
^[[Bpanic: runtime error: assignment to entry in nil map
goroutine 58 [running]:
runtime.panic(0x9e6940, 0xd840b3)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
github.com/cgrates/cgrates/engine.(*Account).GetDefaultMoneyBalance(0xc2082bcb90, 0xc208409ff8, 0x4, 0xc208253c30)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/account.go:299 +0x347
github.com/cgrates/cgrates/engine.(*Account).debitCreditBalance(0xc2082bcb90, 0xc20884e000, 0x1, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/account.go:252 +0xd0a
github.com/cgrates/cgrates/engine.(*CallDescriptor).debit(0xc208f27200, 0xc2082bcb90, 0xc20884e000, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/calldesc.go:572 +0x454
github.com/cgrates/cgrates/engine.func·007(0x0, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/calldesc.go:596 +0x62
github.com/cgrates/cgrates/engine.(*AccountLock).GuardMany(0xc2080b1b60, 0x0, 0x0, 0x0, 0x7faf3d93f6c8, 0xc2083aec30, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/accountlock.go:85 +0x27a
github.com/cgrates/cgrates/engine.(*CallDescriptor).Debit(0xc208f27200, 0x0, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/calldesc.go:598 +0x1c6
github.com/cgrates/cgrates/engine.func·013(0x8ab940, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/responder.go:68 +0x38
github.com/cgrates/cgrates/engine.(*AccountLock).GuardGetCost(0xc2080b1b60, 0xc208f1ac60, 0x1c, 0x7faf3d93f7e8, 0x8, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/accountlock.go:51 +0x1ae
github.com/cgrates/cgrates/engine.(*Responder).Debit(0xc2080eeea0, 0xc208409ff8, 0x4, 0xc2083aebc0, 0x8, 0xc2083aeb30, 0xb, 0xc2083aeb40, 0xb, 0xc2083aeb30, ...)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/responder.go:69 +0x133
github.com/cgrates/cgrates/engine.(*Mediator).getCostFromRater(0xc208122500, 0xc20813f400, 0x8, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/mediator.go:93 +0x302
github.com/cgrates/cgrates/engine.(*Mediator).rateCDR(0xc208122500, 0xc20813f400, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/mediator.go:113 +0x23d
github.com/cgrates/cgrates/engine.(*Mediator).RateCdr(0xc208122500, 0xc20813f400, 0x1, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/mediator.go:168 +0x620
github.com/cgrates/cgrates/engine.func·010()
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/cdrs.go:53 +0x43
created by github.com/cgrates/cgrates/engine.storeAndMediate
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/cdrs.go:56 +0x16d
goroutine 16 [chan receive, 8 minutes]:
main.main()
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:511 +0x1c4a
goroutine 19 [finalizer wait, 8 minutes]:
runtime.park(0x41aa40, 0xd88780, 0xd86989)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0xd88780, 0xd86989)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
goroutine 20 [syscall, 8 minutes]:
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 +0x32
goroutine 22 [chan send, 8 minutes]:
github.com/cgrates/cgrates/balancer2go.func·001()
/tmp/cgrates/src/github.com/cgrates/cgrates/balancer2go/balancer.go:31 +0x150
created by github.com/cgrates/cgrates/balancer2go.NewBalancer
/tmp/cgrates/src/github.com/cgrates/cgrates/balancer2go/balancer.go:34 +0xd3
goroutine 23 [chan receive, 8 minutes]:
database/sql.(*DB).connectionOpener(0xc2080b5580)
/usr/local/go/src/pkg/database/sql/sql.go:583 +0x48
created by database/sql.Open
/usr/local/go/src/pkg/database/sql/sql.go:442 +0x27c
goroutine 35 [IO wait, 5 minutes]:
net.runtime_pollWait(0x7faf419f3208, 0x72, 0x0)
/usr/local/go/src/pkg/runtime/netpoll.goc:146 +0x66
net.(*pollDesc).Wait(0xc20893f950, 0x72, 0x0, 0x0)
/usr/local/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
net.(*pollDesc).WaitRead(0xc20893f950, 0x0, 0x0)
/usr/local/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
net.(*netFD).accept(0xc20893f8f0, 0xba6be0, 0x0, 0x7faf419f2418, 0xb)
/usr/local/go/src/pkg/net/fd_unix.go:409 +0x343
net.(*TCPListener).AcceptTCP(0xc208309858, 0x6, 0x0, 0x0)
/usr/local/go/src/pkg/net/tcpsock_posix.go:234 +0x5d
net.(*TCPListener).Accept(0xc208309858, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/pkg/net/tcpsock_posix.go:244 +0x4b
github.com/cgrates/cgrates/engine.(*Server).ServeGOB(0xd8e770, 0xa7f950, 0xe)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/server.go:82 +0x2a3
created by main.serveRpc
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:262 +0x105
goroutine 25 [chan receive, 8 minutes]:
main.generalSignalHandler()
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/registration.go:49 +0x191
created by main.main
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:441 +0x1344
goroutine 26 [select, 8 minutes]:
github.com/cgrates/cgrates/scheduler.(*Scheduler).Loop(0xc2080b38c0)
/tmp/cgrates/src/github.com/cgrates/cgrates/scheduler/scheduler.go:66 +0x473
main.func·001()
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:451 +0xd9
created by main.main
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:452 +0x13f2
[100/9868]
goroutine 34 [IO wait, 5 minutes]:
net.runtime_pollWait(0x7faf419f32b8, 0x72, 0x0)
/usr/local/go/src/pkg/runtime/netpoll.goc:146 +0x66
net.(*pollDesc).Wait(0xc20893f8e0, 0x72, 0x0, 0x0)
/usr/local/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
net.(*pollDesc).WaitRead(0xc20893f8e0, 0x0, 0x0)
/usr/local/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
net.(*netFD).accept(0xc20893f880, 0xba6be0, 0x0, 0x7faf419f2418, 0xb)
/usr/local/go/src/pkg/net/fd_unix.go:409 +0x343
net.(*TCPListener).AcceptTCP(0xc208309850, 0x6, 0x0, 0x0)
/usr/local/go/src/pkg/net/tcpsock_posix.go:234 +0x5d
net.(*TCPListener).Accept(0xc208309850, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/pkg/net/tcpsock_posix.go:244 +0x4b
github.com/cgrates/cgrates/engine.(*Server).ServeJSON(0xd8e770, 0xa7f930, 0xe)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/server.go:60 +0x2a3
created by main.serveRpc
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:261 +0xc9
goroutine 36 [syscall]:
syscall.Syscall(0x0, 0x11, 0xc2083e7e98, 0x10000, 0xc208046582, 0x0, 0xc208046580)
/usr/local/go/src/pkg/syscall/asm_linux_amd64.s:21 +0x5
syscall.read(0x11, 0xc2083e7e98, 0x10000, 0x10000, 0x0, 0x0, 0x0)
/usr/local/go/src/pkg/syscall/zsyscall_linux_amd64.go:838 +0x75
syscall.Read(0x11, 0xc2083e7e98, 0x10000, 0x10000, 0xc208046610, 0x0, 0x0)
/usr/local/go/src/pkg/syscall/syscall_unix.go:136 +0x5c
github.com/howeyc/fsnotify.(*Watcher).readEvents(0xc209178180)
/tmp/cgrates/src/github.com/howeyc/fsnotify/fsnotify_linux.go:219 +0x133
created by github.com/howeyc/fsnotify.NewWatcher
/tmp/cgrates/src/github.com/howeyc/fsnotify/fsnotify_linux.go:126 +0x288
goroutine 29 [select]:
github.com/cgrates/cgrates/cdrc.(*Cdrc).trackCDRFiles(0xc208867a00, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/cdrc/cdrc.go:177 +0x5b0
github.com/cgrates/cgrates/cdrc.(*Cdrc).Run(0xc208867a00, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/cdrc/cdrc.go:78 +0x43
main.startCdrc(0xc2080048a0, 0xc208004907, 0x8, 0xc2080f270b, 0x3, 0xc2080e7b2d, 0x18, 0xc2080b4c8e, 0x19, 0xa6e090, ...)
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:137 +0x2e1
created by main.main
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:491 +0x19ac
goroutine 37 [chan receive]:
github.com/howeyc/fsnotify.(*Watcher).purgeEvents(0xc209178180)
/tmp/cgrates/src/github.com/howeyc/fsnotify/fsnotify.go:21 +0x51
created by github.com/howeyc/fsnotify.NewWatcher
/tmp/cgrates/src/github.com/howeyc/fsnotify/fsnotify_linux.go:127 +0x2a0
/tmp/cgrates/src/github.com/howeyc/fsnotify/fsnotify_linux.go:127 +0x2a0
net.runtime_pollWait(0x7faf419f3158, 0x72, 0x0)
/usr/local/go/src/pkg/runtime/netpoll.goc:146 +0x66
net.(*pollDesc).Wait(0xc20893f9c0, 0x72, 0x0, 0x0)
/usr/local/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
net.(*pollDesc).WaitRead(0xc20893f9c0, 0x0, 0x0)
/usr/local/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
net.(*netFD).accept(0xc20893f960, 0xba6be0, 0x0, 0x7faf419f2418, 0xb)
/usr/local/go/src/pkg/net/fd_unix.go:409 +0x343
net.(*TCPListener).AcceptTCP(0xc208309868, 0x7faf41859d18, 0x0, 0x0)
/usr/local/go/src/pkg/net/tcpsock_posix.go:234 +0x5d
net/http.tcpKeepAliveListener.Accept(0xc208309868, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/pkg/net/http/server.go:1947 +0x4b
net/http.(*Server).Serve(0xc209178360, 0x7faf41a16c50, 0xc208309868, 0x0, 0x0)
/usr/local/go/src/pkg/net/http/server.go:1698 +0x91
net/http.(*Server).ListenAndServe(0xc209178360, 0x0, 0x0)
/usr/local/go/src/pkg/net/http/server.go:1688 +0x14d
net/http.ListenAndServe(0xa7f990, 0xe, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/pkg/net/http/server.go:1778 +0x79
github.com/cgrates/cgrates/engine.(*Server).ServeHTTP(0xd8e770, 0xa7f990, 0xe)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/server.go:98 +0x14c
main.serveHttp(0xc208036090, 0x1, 0x1)
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:270 +0xc1
created by main.main
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:509 +0x1c25
goroutine 32 [chan receive, 8 minutes]:
main.reloadSchedulerSingnalHandler(0xc2080b38c0, 0x7faf419f3fe0, 0xc2080fc0e0)
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/registration.go:111 +0x116
created by main.func·001
/tmp/cgrates/src/github.com/cgrates/cgrates/cmd/cgr-engine/cgr-engine.go:448 +0x9e
goroutine 41 [IO wait]:
net.runtime_pollWait(0x7faf419f2f48, 0x72, 0x0)
/usr/local/go/src/pkg/runtime/netpoll.goc:146 +0x66
net.(*pollDesc).Wait(0xc2083a4990, 0x72, 0x0, 0x0)
/usr/local/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
net.(*pollDesc).WaitRead(0xc2083a4990, 0x0, 0x0)
/usr/local/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
net.(*netFD).Read(0xc2083a4930, 0xc20855b000, 0x1000, 0x1000, 0x0, 0x7faf419f2418, 0xb)
/usr/local/go/src/pkg/net/fd_unix.go:232 +0x34c
net.(*conn).Read(0xc208393098, 0xc20855b000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/pkg/net/net.go:122 +0xe7
github.com/go-sql-driver/mysql.(*buffer).fill(0xc208106d00, 0x4, 0x0, 0x0)
/tmp/cgrates/src/github.com/go-sql-driver/mysql/buffer.go:57 +0x271
github.com/go-sql-driver/mysql.(*buffer).readNext(0xc208106d00, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0)
/tmp/cgrates/src/github.com/go-sql-driver/mysql/buffer.go:86 +0x6c
github.com/go-sql-driver/mysql.(*mysqlConn).readPacket(0xc208106d00, 0x0, 0x0, 0x0, 0x0, 0x0)
/tmp/cgrates/src/github.com/go-sql-driver/mysql/packets.go:30 +0x9d
github.com/go-sql-driver/mysql.(*mysqlConn).readResultSetHeaderPacket(0xc208106d00, 0xc20814a603, 0x0, 0x0)
/tmp/cgrates/src/github.com/go-sql-driver/mysql/packets.go:421 +0x42
github.com/go-sql-driver/mysql.(*mysqlConn).exec(0xc208106d00, 0xc2088c3880, 0x1b0, 0x0, 0x0)
/tmp/cgrates/src/github.com/go-sql-driver/mysql/connection.go:197 +0x89
github.com/go-sql-driver/mysql.(*mysqlConn).Exec(0xc208106d00, 0xc2088c3880, 0x1b0, 0xd89608, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/tmp/cgrates/src/github.com/go-sql-driver/mysql/connection.go:173 +0x179
database/sql.(*DB).exec(0xc2080b5580, 0xc2088c3880, 0x1b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/pkg/database/sql/sql.go:889 +0x2e2
database/sql.(*DB).Exec(0xc2080b5580, 0xc2088c3880, 0x1b0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/pkg/database/sql/sql.go:866 +0xd4
github.com/cgrates/cgrates/engine.(*SQLStorage).SetCdr(0xc2080361d0, 0xc209094a00, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/storage_sql.go:579 +0x5ea
github.com/cgrates/cgrates/engine.storeAndMediate(0xc209094a00, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/cdrs.go:40 +0x81
github.com/cgrates/cgrates/engine.(*CDRS).ProcessCdr(0xd89608, 0xc209094a00, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/engine/cdrs.go:113 +0x39
github.com/cgrates/cgrates/cdrc.(*Cdrc).processFile(0xc208867a00, 0xc20839e000, 0x37, 0x0, 0x0)
/tmp/cgrates/src/github.com/cgrates/cgrates/cdrc/cdrc.go:222 +0xaf0
github.com/cgrates/cgrates/cdrc.func·002()
/tmp/cgrates/src/github.com/cgrates/cgrates/cdrc/cdrc.go:181 +0x5d
created by github.com/cgrates/cgrates/cdrc.(*Cdrc).trackCDRFiles
/tmp/cgrates/src/github.com/cgrates/cgrates/cdrc/cdrc.go:184 +0x412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment