Navigation Menu

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

SQLite database locked followed by readonly errors preventing http connections. #1469

Closed
dbalnaves opened this issue Apr 30, 2022 · 3 comments

Comments

@dbalnaves
Copy link

dbalnaves commented Apr 30, 2022

Describe the bug
SQLite database locked followed by readonly errors preventing http connections (timeout).

To Reproduce
Cloned master c2845b1
1)

$ make docker

creates this container:

CONTAINER ID   IMAGE                          COMMAND                  CREATED          STATUS          PORTS                                       NAMES
ab548bb9d9b7   munin:latest                   "dev_scripts/noop"       18 seconds ago   Up 16 seconds   0.0.0.0:4948->4948/tcp, :::4948->4948/tcp   munin

2) $ make docker-connect

(puts me inside container)

3) $ dev_scripts/all

The scripts spews update info but in the mess the following error will eventually appear:

[error][000165]: Error in node communication with ipv4-6.sandbox.local (localhost:4947): DBD::SQLite::st execute failed: database is locked at /munin/sandbox/lib/perl5/Munin/Master/Update.pm
line 86, <GEN0> line 1.

Despite this, the http server will eventually start:

2022/04/30-08:17:58 Munin::Master::Http::NetServer (type Net::Server::PreFork) starting! pid(1331)
Resolved [*]:4948 to [::]:4948, IPv6
Not including resolved host [0.0.0.0] IPv4 because it will be handled by [::] IPv6
Binding to TCP port 4948 on host :: with IPv6
Group Not Defined.  Defaulting to EGID '1000 27'
User Not Defined.  Defaulting to EUID '1000'
# [dev/run] Found: /munin/sandbox/bin/munin-update
# [dev/run] Command line: /usr/bin/perl -T -Mlib=/munin/sandbox/lib/perl5/ /munin/sandbox/bin/munin-update --screen --verbose

  1. Connect via http

Variations of the following error will repeat a bunch of times(while browser timesout waiting for a response):

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.

Expected behavior
Do not expect to see the database locked. This is then followed by other database errors such as readonly which prevents the http server from servicing requests.

Screenshots & Logs
Full locked error running update:

[error][000140]: Error in node communication with ipv4-10.sandbox.local (localhost:4947): DBD::SQLite::st execute failed: database is locked at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86, <GEN0> line 572.
        Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: database is locked", DBI::st=HASH(0x558a804e0f38), undef) called at /munin/sandbox/lib/perl5/Munin/Master/UpdateWorker.pm line 510
        Munin::Master::UpdateWorker::_db_state_update(Munin::Master::UpdateWorker=HASH(0x558a81cb05b8), "buddyinfo_Node_0_DMA32", "chunk_Node_0_DMA32_0", 1651312373, 54708) called at /munin/sandbox/lib/perl5/Munin/Master/UpdateWorker.pm line 753
        Munin::Master::UpdateWorker::uw_handle_fetch(Munin::Master::UpdateWorker=HASH(0x558a81cb05b8), "buddyinfo_Node_0_DMA32", 1651312373, 300, ARRAY(0x558a81d40958)) called at /munin/sandbox/lib/perl5/Munin/Master/UpdateWorker.pm line 203
        Munin::Master::UpdateWorker::__ANON__("buddyinfo_Node_0_DMA32", ARRAY(0x558a81d40958)) called at /munin/sandbox/lib/perl5/Munin/Master/Node.pm line 485
        Munin::Master::Node::_node_read(Munin::Master::Node=HASH(0x558a81cb0558), CODE(0x558a81d21620)) called at /munin/sandbox/lib/perl5/Munin/Master/Node.pm line 362
        Munin::Master::Node::fetch_service_data(Munin::Master::Node=HASH(0x558a81cb0558), "meminfo", CODE(0x558a81d21620)) called at /munin/sandbox/lib/perl5/Munin/Master/UpdateWorker.pm line 205
        eval {...} called at /munin/sandbox/lib/perl5/Munin/Master/UpdateWorker.pm line 104
        Munin::Master::UpdateWorker::__ANON__() called at /munin/sandbox/lib/perl5/Munin/Master/Node.pm line 54
        Munin::Master::Node::do_in_session(Munin::Master::Node=HASH(0x558a81cb0558), CODE(0x558a81cd68e0)) called at /munin/sandbox/lib/perl5/Munin/Master/UpdateWorker.pm line 238
        Munin::Master::UpdateWorker::do_work(Munin::Master::UpdateWorker=HASH(0x558a81cb05b8)) called at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 199
        eval {...} called at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 194
        Munin::Master::Update::_run_workers(Munin::Master::Update=HASH(0x558a8123adc8)) called at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 58
        Munin::Master::Update::__ANON__() called at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 135
        Munin::Master::Update::_do_with_timing(Munin::Master::Update=HASH(0x558a8123adc8), CODE(0x558a81283df8)) called at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 60
        Munin::Master::Update::run(Munin::Master::Update=HASH(0x558a8123adc8)) called at /munin/sandbox/bin/munin-update line 43
        main::main() called at /munin/sandbox/bin/munin-update line 118

Full locked and readonly errors when connecting via http:

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d1142d78), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e26910)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e26910)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d0e11030)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d1142b68), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e26948)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e26948)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d0e11240)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d1142b48), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e26900)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e26900)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d0e111c8)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d1142d78), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e26910)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e26910)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d0e11288)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d1142da8), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e26988)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e26988)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d0e112d0)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153, <$read> line 1.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86, <$read> line 1.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d11492e0), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e31888)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e31888)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d0e112a0)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 1) called at /usr/share/perl5/Net/Server/PreFork.pm line 380
	Net::Server::PreFork::coordinate_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 327
	Net::Server::PreFork::run_parent(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 109
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d1142370), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e17168)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e17168)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d1143030)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d0e267f8), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e17168)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e17168)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d1142e20)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d1142140), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e17168)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e17168)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d1142e00)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/munin/sandbox/var/lib/datafile.sqlite at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153.
DBD::SQLite::st execute failed: attempt to write a readonly database at /munin/sandbox/lib/perl5/Munin/Master/Update.pm line 86.
	Munin::Master::Update::__ANON__("DBD::SQLite::st execute failed: attempt to write a readonly d"..., DBI::st=HASH(0x55c3d0e26a30), undef) called at /munin/sandbox/lib/perl5/Munin/Master/HTML.pm line 137
	Munin::Master::HTML::handle_request(CGI=HASH(0x55c3d0e17168)) called at /munin/sandbox/bin/munin-httpd line 29
	Munin::Master::Http::handle_request(Munin::Master::Http=HASH(0x55c3cea8e0c0), CGI=HASH(0x55c3d0e17168)) called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	eval {...} called at /usr/share/perl5/HTTP/Server/Simple/CGI.pm line 153
	HTTP::Server::Simple::CGI::handler(Munin::Master::Http=HASH(0x55c3cea8e0c0)) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 271
	HTTP::Server::Simple::CGI::PreFork::__ANON__(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), Net::Server::Proto::TCP=GLOB(0x55c3d1143030)) called at /usr/share/perl5/Net/Server.pm line 73
	Net::Server::run_client_connection(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	eval {...} called at /usr/share/perl5/Net/Server/PreFork.pm line 225
	Net::Server::PreFork::run_child(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server/PreFork.pm line 183
	Net::Server::PreFork::run_n_children(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80), 5) called at /usr/share/perl5/Net/Server/PreFork.pm line 107
	Net::Server::PreFork::loop(Munin::Master::Http::NetServer=HASH(0x55c3d0d69d80)) called at /usr/share/perl5/Net/Server.pm line 58
	Net::Server::run("Munin::Master::Http::NetServer", "port", HASH(0x55c3cea6d488), Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /usr/share/perl5/HTTP/Server/Simple/CGI/PreFork.pm line 343
	HTTP::Server::Simple::CGI::PreFork::run(Munin::Master::Http=HASH(0x55c3cea8e0c0), "prefork", 1, "max_servers", 10) called at /munin/sandbox/bin/munin-httpd line 52

Desktop (please complete the following information):

  • Ubuntu 18.04.6 LTS / Docker version 20.10.7
  • Soemthing Chrome
  • Munin Version 2.999.16-51-gc2845b16

Additional context
I worked around this error by:

diff --git a/lib/Munin/Master/Update.pm b/lib/Munin/Master/Update.pm
index 480dc3a7..ee5c6a93 100644
--- a/lib/Munin/Master/Update.pm
+++ b/lib/Munin/Master/Update.pm
@@ -77,7 +77,7 @@ sub get_dbh {
        # die loudly than injecting some misguided data
        use DBI;
        my %db_args;
-       $db_args{ReadOnly} = 1 if $is_read_only;
+       $db_args{ReadOnly} = 0 if $is_read_only;
        #       $db_args{AutoCommit} = 0 if $is_read_only;
        $db_args{AutoCommit} = 0;
        $db_args{RaiseError} = 1;
@dbalnaves
Copy link
Author

Thought I would check to see if this had been fixed - still an issue in 2.999.16-72-g173d0ac9

jchristgit added a commit to jchristgit/munin that referenced this issue May 2, 2023
Trying to run the munin dev setup locally results in the error reported
at munin-monitoring#1469. From my understanding this is caused by the same SQLite file
being set into read-only mode by one process and trying to be written to
by another, so disable read-only mode for SQLite altogether.

Fixes munin-monitoring#1469.
@steveschnepp
Copy link
Member

steveschnepp commented Jun 30, 2023

Can you check if still an issue in 9fbb776 that is in #1549 ?

@jchristgit
Copy link
Contributor

Following up from #1536, I can confirm the recent changes fixed it, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants