I have a server program that is listening to connections, creating a new
goroutine for each connection.

A client program connected to the server, and triggered a runtime Panic
because a bug in one of my function (Index Out-of-Range error).

The problem is that the server did not crash. It just "froze" because a
deadlock occurred.

I have always thought that a runtime panic would always crash the program,
but it is not the case if other goroutines are still active.

Here is a simplified example:


This sample program doesn't crash and continues to print "tick" on the
screen, although an "Index Out-Of-Range" error occurred int he "Print()"

No stacktrace is displayed, which makes it hard to imagine that a trivial
Index Out-of-Range error has occurred.

Is it expected behaviour, or should this be changed ?

Any opinion ?

You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupgolang-nuts @
postedMay 20, '16 at 10:17p
activeMay 20, '16 at 11:50p



site design / logo © 2021 Grokbase