Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataflow causes crash when THRnew fails #6632

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Dataflow causes crash when THRnew fails #6632

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2018-07-31 13:25:32 +0200
From: @yzchang
To: MonetDB5 devs <>
Version: 11.29.3 (Mar2018)

Last updated: 2018-08-31 13:23:23 +0200

Comment 26575

Date: 2018-07-31 13:25:32 +0200
From: @yzchang

In DFLOWworker(), the return value of "thr = THRnew("DFLOWworker");" is not checked. So, if THRnew() failed (e.g. too many threads already), DFLOWworker() will trigger a SIGSEGV when thr is used.

In general, there are 6 places where THRnew is used:

$ grep -r =.*THRnew *
monetdb5/modules/mal/tablet.c: thr = THRnew("SQLworker");
monetdb5/modules/mal/tablet.c: thr = THRnew("SQLproducer");
monetdb5/mal/mal_client.c: t = THRnew(cname);
monetdb5/mal/mal_dataflow.c: thr = THRnew("DFLOWworker");
sql/server/sql_mvc.c: Thread thr = THRnew("logmanager");
sql/server/sql_mvc.c: Thread thr = THRnew("idlemanager");

Only in mal_client.c, the return value is checked.

Comment 26576

Date: 2018-08-01 10:12:32 +0200
From: MonetDB Mercurial Repository <>

Changeset 7f7bdde7c0d6 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7f7bdde7c0d6

Changeset description:

Check THRnew result.
This should fix bug #6632.

Comment 26577

Date: 2018-08-01 12:29:33 +0200
From: @sjoerdmullender

The changesets 7f7bdde7c0d6 2b373f2e74f3 and 709ebc975d62 together fix this issue. All THRnew calls are now checked.

Comment 26578

Date: 2018-08-01 12:55:03 +0200
From: MonetDB Mercurial Repository <>

Changeset 0d3f2de0372f made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=0d3f2de0372f

Changeset description:

Check THRnew result.
This should fix bug #6632.
(grafted from 7f7bdde7c0d6b9b4176030d3fc68dacf2e959b63)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant