Skip to content

Parsing XML dies (stays blocked) when doing in parallel #90

Description

@krezac

Hello all,
I've discovered this while load-testing my app on Windows 7. When there are multiple goroutines doing XML parsing, sooner or later all of them stay stucked in xml.Parse() and the CPU load drops to zero.

It's much more probable for go run than for building and running the executable. So far I wasn't able to repro it on linux.

See the attached sample code (no request, just 10 go routines running in loop).
It should timeout after 20 seconds (or 10000 iterations) but with go run it usually ends up like

Id 8, iter: 571, elapsed: 5.018003
Id 8, iter: 572, elapsed: 5.021004
Id 8, iter: 573, elapsed: 5.023504
Id 8, iter: 574, elapsed: 5.026005
Id 8, iter: 575, elapsed: 5.029006
Done -- this is outputted after 20s - timeout expired

Any idea what can be wrong?
Thanks in advance
gokogiri-load.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions