Skip to content
This repository was archived by the owner on Jul 25, 2018. It is now read-only.
This repository was archived by the owner on Jul 25, 2018. It is now read-only.

Sometimes sumo breaks! #16

@tkt028

Description

@tkt028

I run sumo in RHEL 6.X, sometimes sumo succeeds, sometimes failed as below:

$ cat server.log | sumo search "ERROR" | sumo search "Exception" | sumo parse "*:* *:* * [" as filename, date, hour, time, loginfo | sumo count hour date | render-basic

======
_Id   _count   date          hour
0     23       "2017-01-06   09
1     23       "2017-01-06   10
2     27       "2017-01-06   11
3     23       "2017-01-06   12
4     11       "2017-01-06   13
5     15       "2017-01-06   14
6     20       "2017-01-06   15
7     23       "2017-01-06   16
8     36       "2017-01-06   17
9     10       "2017-01-06   18
10    8        "2017-01-06   19
11    1        "2017-01-06   20
12    1        "2017-01-06   22
13    1        "2017-01-06   23
14    1        "2017-01-07   00
15    1        "2017-01-07   02
16    2        "2017-01-07   07
17    1        "2017-01-07   08
18    2        "2017-01-07   11
19    1        "2017-01-07   17
20    1        "2017-01-08   00
21    1        "2017-01-08   02
panic: assignment to entry in nil map

goroutine 6 [running]:
github.com/SumoLogic/sumoshell/group.Merger.Flush(0xc820010bd0, 0xc820018500, 0xc8200184f0)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/group/Grouper.go:114 +0x202
github.com/SumoLogic/sumoshell/group.flush(0xc820010bd0, 0xc820018500, 0xc8200184f0, 0xc82000a540)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/group/Grouper.go:125 +0x69
created by github.com/SumoLogic/sumoshell/group.NewMerger
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/group/Grouper.go:78 +0x151

goroutine 1 [syscall]:
syscall.Syscall(0x0, 0x0, 0xc82002b000, 0x1000, 0xc820184090, 0x4, 0x5a4450)
        /usr/local/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0x0, 0xc82002b000, 0x1000, 0x1000, 0xc820184090, 0x0, 0x0)
        /usr/local/go/src/syscall/zsyscall_linux_amd64.go:783 +0x5f
syscall.Read(0x0, 0xc82002b000, 0x1000, 0x1000, 0xc8201608e0, 0x0, 0x0)
        /usr/local/go/src/syscall/syscall_unix.go:160 +0x4d
os.(*File).read(0xc82003c008, 0xc82002b000, 0x1000, 0x1000, 0xe, 0x0, 0x0)
        /usr/local/go/src/os/file_unix.go:211 +0x53
os.(*File).Read(0xc82003c008, 0xc82002b000, 0x1000, 0x1000, 0xc820160900, 0x0, 0x0)
        /usr/local/go/src/os/file.go:95 +0x8a
bufio.(*Reader).fill(0xc82004fc68)
        /usr/local/go/src/bufio/bufio.go:97 +0x1e9
bufio.(*Reader).ReadSlice(0xc82004fc68, 0xc82001850a, 0x0, 0x0, 0x0, 0x0, 0x0)
        /usr/local/go/src/bufio/bufio.go:328 +0x21a
bufio.(*Reader).ReadLine(0xc82004fc68, 0x0, 0x0, 0x0, 0xc820184000, 0x0, 0x0)
        /usr/local/go/src/bufio/bufio.go:357 +0x53
github.com/SumoLogic/sumoshell/util.ConnectToReader(0x7f8ae6cc4218, 0xc820016500, 0x7f8ae6cc4290, 0xc82003c008)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/util/Raw.go:64 +0x421
github.com/SumoLogic/sumoshell/util.ConnectToStdIn(0x7f8ae6cc4218, 0xc820016500)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/util/Raw.go:36 +0xa3
main.connectAggOperator(0x7ffd71a95508, 0x5, 0xc82000a510, 0x3, 0x3, 0x8c8feb670ee1a900)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/sumo/Main.go:70 +0x237
main.main()
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/sumo/Main.go:45 +0x226

goroutine 7 [semacquire]:
sync.runtime_Semacquire(0xc8200184f4)
        /usr/local/go/src/runtime/sema.go:43 +0x26
sync.(*Mutex).Lock(0xc8200184f0)
        /usr/local/go/src/sync/mutex.go:82 +0x1c4
github.com/SumoLogic/sumoshell/group.Merger.Process(0xc820010bd0, 0xc820018500, 0xc8200184f0, 0xc820155290)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/group/Grouper.go:98 +0x30
github.com/SumoLogic/sumoshell/group.Merger.Write(0xc820010bd0, 0xc820018500, 0xc8200184f0, 0xc820155290)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/group/Grouper.go:106 +0x3f
github.com/SumoLogic/sumoshell/group.(Merger).Write-fm(0xc820155290)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/average/Average.go:31 +0x3f
github.com/SumoLogic/sumoshell/count.count.Flush(0xc820349360, 0xc8200b3c20, 0xc82025f760)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/count/Count.go:38 +0x1c5
github.com/SumoLogic/sumoshell/count.(*count).Flush(0xc82025f780)
        :1 +0xa1
github.com/SumoLogic/sumoshell/group.Grouper.Flush(0xc82000a5c0, 0xc820010c00, 0xc820010bd0, 0xc820018500, 0xc8200184f0, 0xc82000a520, 0x2, 0x2, 0x0, 0x0)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/group/Grouper.go:35 +0x99
github.com/SumoLogic/sumoshell/group.(*Grouper).Flush(0xc820016500)
        :4 +0x96
main.flush(0x7f8ae6cc41e8, 0xc820016500, 0xc82000a600)
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/sumo/Main.go:98 +0x5b
created by main.connectAggOperator
        /home/russell/code/go/src/github.com/SumoLogic/sumoshell/sumo/Main.go:69 +0x1f6

Please help fix it. Thank you very much!
Cheers,
Khon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions