GNU bug report logs - #48945
PostgreSQL + Cuirass Errors

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Eric Brown <ecbrown@HIDDEN>; dated Thu, 10 Jun 2021 11:16:01 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Jun 2021 11:15:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 10 07:15:04 2021
Received: from localhost ([127.0.0.1]:35571 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lrIeN-0007H3-RX
	for submit <at> debbugs.gnu.org; Thu, 10 Jun 2021 07:15:04 -0400
Received: from lists.gnu.org ([209.51.188.17]:60046)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ecbrown@HIDDEN>) id 1lrIeL-0007Gv-Vv
 for submit <at> debbugs.gnu.org; Thu, 10 Jun 2021 07:15:02 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56656)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ecbrown@HIDDEN>)
 id 1lrIeL-0005xW-Px
 for bug-guix@HIDDEN; Thu, 10 Jun 2021 07:15:01 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:56373)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ecbrown@HIDDEN>)
 id 1lrIeJ-0005O1-K2
 for bug-guix@HIDDEN; Thu, 10 Jun 2021 07:15:01 -0400
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id 158D85C0228
 for <bug-guix@HIDDEN>; Thu, 10 Jun 2021 07:14:57 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Thu, 10 Jun 2021 07:14:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericcbrown.com;
 h=from:to:subject:date:message-id:mime-version:content-type; s=
 fm2; bh=xxLSDyUTA4606cdYEMm5rSrALCOvvJw9gs4FTlhrMLs=; b=q7emE21u
 cDNioKpVf29yC/wBdHp7SBC+XaxLDlhdC/gJLJMCVfPOFxEaZA9iICFIUihVN921
 j7F7XVyiGVbQeFTi7dNAp6D2CNwTNUvmyPG2qQYYWjBSNaS2A+U0PFOl7oYP4jdp
 EEj4XEU/uM9QG3S2C6zIPsBMgWk+iLZxodzwhOKru1mEqVPte3aniQHI3MQEeP/v
 015lslscX7nXE2fo1egQitPxGgDHvF3gUvvoUgEd4C0qHUWx9qGLah1v8jodnZQY
 UFLW22lPc6gmIfpsbGiuVydXT8pKi+lUwEnfqtOekx/IzJ+UGZXBUmV3c5KeBtCn
 OUbDyxVCQHLvwg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm3; bh=xxLSDyUTA4606cdYEMm5rSrALCOvv
 Jw9gs4FTlhrMLs=; b=P26+MEgaZ9ObO+pTcZ2BvJ3kBFKscBaWIlxSbDMTFrplC
 a0b0dRm1pFLLoLxLRoigQ4dnpzZXf05XxxnnEV36IGSpTNgnPJJdfTFj9lyh0P5S
 fEx8BckZps3ZQRCEb6VjMWHrHUSrSlt+GKT6+B6ZRMEzZ6QR4PzNLoEHvEHioqLa
 FbTygXqyuwiy9osradNsJn/fWq2xG3sFCkLKO8G/swOV/jRsJQnvsA46/LJg4bHu
 DnJ60LklK6S0kJSTydYwpVXtcpzDlBLIgQq2swtd7dL363aEPaB+Xrh+4EZpM+r6
 L8mv+yGL+F7eD19VWdRSFg0tX+A0aN3arwcWhXlng==
X-ME-Sender: <xms:MPTBYNOEsdO6jzneTyeuuMysARZtxsWdeoZ63JYNFVJzfLMId69ktQ>
 <xme:MPTBYP87ZVR6ssfoK9s0JVJytKeXbgLuhSoko_4m65jUFDeh0P3R2kRo62bf7AdDt
 rlcvmJgrVwvJ49M_Q>
X-ME-Received: <xmr:MPTBYMT9dUv06wX7MQXPwUB6dK7xme_-XFo5ZAzO4J271kZOH-SWHKeo>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedufedgfeejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesthdtredttd
 ertdenucfhrhhomhepgfhrihgtuceurhhofihnuceovggtsghrohifnhesvghrihgttggs
 rhhofihnrdgtohhmqeenucggtffrrghtthgvrhhnpedvveetuefhleetuedvhfegheffve
 ffteefkeduleektdffjefhgeetveejiefgvdenucevlhhushhtvghrufhiiigvpedtnecu
 rfgrrhgrmhepmhgrihhlfhhrohhmpegvtggsrhhofihnsegvrhhitggtsghrohifnhdrtg
 homh
X-ME-Proxy: <xmx:MPTBYJuQzlD6PmT5driRqRa5udo1Fn0W9mIFEnk9yMeyKzvsf4sxHw>
 <xmx:MPTBYFeYBvPye_d_hyVMhfwmj3HYa37lqxrGjTIODv0uRnRDP800MA>
 <xmx:MPTBYF2jx8mpAn8N7ZF5r0fKa9TkImAN8qoXspEyS9laV9Ix01cgQQ>
 <xmx:MfTBYLpP7z2UWUPveE_NpTPMutz3KNsTvxVnDmHYILth-03mKnKn-Q>
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <bug-guix@HIDDEN>; Thu, 10 Jun 2021 07:14:56 -0400 (EDT)
From: Eric Brown <ecbrown@HIDDEN>
To: bug-guix@HIDDEN
Subject: PostgreSQL + Cuirass Errors
Mail-reply-to: Eric Brown <ecbrown@HIDDEN>
Mail-followup-to: Eric Brown <ecbrown@HIDDEN>
Date: Thu, 10 Jun 2021 06:14:55 -0500
Message-ID: <87h7i6otsg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=66.111.4.26; envelope-from=ecbrown@HIDDEN;
 helo=out2-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

Hello:

Executive Summary:
- Can't reinstall Cuirass and/or PostgreSQL
- Divide by 0 error reported by postgres when computing metrics

Details:
I am having issues reconfiguring Cuirass and PostgreSQL . I wonder if these are related
to several issues in PostgreSQL, and seem to occur when I reconfigure
either cuirass and/or postgres without Cuirass present, i.e. my "database server"


/etc/config.scm:
----------------

(define %cuirass-specs
  #~(list (specification
           (name "my-cbc")
           (build '(packages "cbc")))
          (specification
           (name "my-ipopt")
           (build '(packages "ipopt")))
          (specification
           (name "my-linux-libre")
           (build '(packages "linux-libre")))
          (specification
           (name "my-openblas-ilp64")
           (build '(packages "openblas-ilp64")))
          (specification
           (name "my-qtbase")
           (build '(packages "qtbase")))
          (specification
           (name "my-sylpheed")
           (build '(packages "sylpheed")))
          (specification
           (name "my-texlive")
           (build '(packages "texlive")))))

(service cuirass-service-type
         (cuirass-configuration
          (specifications %cuirass-specs)))




An example session trying to get cuirass re-installed:

1. Comment out Cuirass in /etc/config.scm and reconfigure

building /gnu/store/9nmk3q8nwk51wqanpw4a5agwak0yfhpj-upgrade-shepherd-services.scm.drv...
shepherd: Removing service 'cuirass-web'...
shepherd: Done.
shepherd: Removing service 'postgres-roles'...
shepherd: Done.
shepherd: Removing service 'cuirass'...
shepherd: Done.
shepherd: Removing service 'postgres'...
shepherd: Done.
shepherd: Service host-name has been started.
shepherd: Service user-homes has been started.
shepherd: Service sysctl has been started.
shepherd: Service host-name has been started.
shepherd: Service term-auto could not be started.
To complete the upgrade, run 'herd restart SERVICE' to stop,
upgrade, and restart each service that was not automatically restarted.
Run 'herd status' to view the list of services on your system

2) At shell:
# rm -rf /var/log/cuirass /var/log/cuirass.log* /var/log/cuirass.log /var/log/cuirass-web.log /var/cache/cuirass /var/lib/postgresql/data /var/lib/cuirass

3) Reboot

4) Check no files above are regenerated, e.g. by other services requiring postgresql (none found)

5) Re-enable Cuirass in /etc/config.scm, reconfigure:  (frequently observed error at end of this item)

selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... US/Central
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... sh: locale: command not found
2021-06-10 05:57:26.532 CDT [1370] WARNING:  no usable system locales were found
ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /gnu/store/jsa77nkqcvsck4ksvm2b8sccl174hai4-postgresql-10.17/bin/pg_ctl -D /var/lib/postgresql/data -l logfile start

The following derivation will be built:
   /gnu/store/bmzhdkki40d8y6d6n9a3gw4g70xmv824-install-bootloader.scm.drv

building /gnu/store/bmzhdkki40d8y6d6n9a3gw4g70xmv824-install-bootloader.scm.drv...
guix system: bootloader successfully installed on '/boot/efi'
shepherd: Service host-name has been started.
shepherd: Service user-homes has been started.
shepherd: Service sysctl has been started.
shepherd: Service host-name has been started.
shepherd: Service term-auto could not be started.
guix system: warning: exception caught while executing 'start' on service 'postgres':
Throw to key `%exception' with args `("#<&invoke-error program: \"/gnu/store/4x3h2096cvzvq65wv40a4acwdyks9ivc-pg_ctl-wrapper\" arguments: (\"start\") exit-status: 1 term-signal: #f stop-signal: #f>")'.
guix system: warning: some services could not be upgraded
hint: To allow changes to all the system services to take effect, you will need to reboot.

6) Reboot

7) telnet localhost 5432

telnet localhost 5432
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

--------

I am also observing divide-by-zero errors reported by a PG process when computing metrics. Perhaps it is ignorable, but it seems to throw a Scheme "stack trace" that doesn't look good.  I was unable to capture the specific message due to thrashing to restart Curirass and the DB.

I am able to reproduce this on several machines, this is my third attempt to install on a fresh machine, use as I expect (ability to add/remove/reconfigure services) etc.

This may be a red herring, but I can't help but feel that postgres is getting pulled in from other services as well, and that there may be a collision (e.g. PostgreSQL 10 and 13 both seem to get referenced.)   I have stripped this system back to (essentially) bare-bones.scm, and see that PostgreSQL is even referenced by networkmanager package/service.  (Which I am loathe to revert to dhcp since it handles wireguard. :-( )

Best regards
Eric

PS I would add that i have seen an error like:
guix system: warning: exception caught while executing 'start' on service 'postgres':
Throw to key `%exception' with args `("#<&invoke-error program: \"/gnu/store/4x3h2096cvzvq65wv40a4acwdyks9ivc-pg_
ctl-wrapper\" arguments: (\"start\") exit-status: 1 term-signal: #f stop-signal: #f>")'.

in another context, it was for nginx but a reboot fixed that and I can serve pages.









Acknowledgement sent to Eric Brown <ecbrown@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#48945; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 10 Jun 2021 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.