Project

General

Profile

Bug #2416

Version 1.4.30 - Minor config problem: config_read: Assertion `context.all_configs->used == 0' failed.

Added by shevegen about 4 years ago. Updated about 4 years ago.

Status:
Fixed
Priority:
Low
Assignee:
-
Category:
-
Target version:
Start date:
2012-04-28
Due date:
% Done:

100%

Missing in 1.5.x:
No

Description

Hi,

I found out that giving -f more than once can cause problems.

lighttpd -f lighttpd.conf -f lighttpd.conf

It was the same .conf file btw (which was my accident, I just found out that lighttpd hates this)

Lighttpd then will say:

lighttpd: configfile.c:1101: config_read: Assertion `context.all_configs->used == 0' failed.
Aborted

And it will abort.

When I first had this problem, it was not obvious to me why it happened (I used an alias actually and then just appended -f again to this alias, which used -f already).

The error message: "Assertion failed" was not useful to me.

Proposal:

Make this specific error message more useful in case a user uses the -f option twice (or more than once).

Suggestion for error message, in case of abort-like problems:

"You seem to be using the -f option more than once."
"Please review your configuration files as they may contradict each other."

And then a listing which specific configuration option is in conflict perhaps - that would be most helpful.


Related issues

Duplicated by Bug #1755: specifying config-file twice crashes lighttpd Duplicate

Associated revisions

Revision 3a13ab8b (diff)
Added by stbuehler about 4 years ago

Detect multiple -f options: show error message instead of assert (fixes #2416)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2836 152afb58-edef-0310-8abb-c4023f1b3aa9

Revision 2836 (diff)
Added by stbuehler about 4 years ago

Detect multiple -f options: show error message instead of assert (fixes #2416)

History

#1 Updated by stbuehler about 4 years ago

  • Target version changed from 1.4.x to 1.4.31

#2 Updated by stbuehler about 4 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2836.

#3 Updated by stbuehler 4 months ago

  • Duplicated by Bug #1755: specifying config-file twice crashes lighttpd added

Also available in: Atom