Bug#1059476: please reopen - still happens with 15.6

2024-02-17 Thread Clemens Eisserer
Hello Michael,

| can you try to upgrade and check whether your
| problamatic case is fixed as well? If not, I will reopen this bug
| report.
| are usually very bad memory leaks
| due to the way PostgreSQL uses LLVM.

I've just tested the query with 15.6 - and the crash still occurs,
despite the closed bug report ;)
As can be seen in my email to the postgresql mailing list this is a
segfault crash, not some failed allocation or the linux oom killer
kicking in.

Also the issue was analyzed by the postgresql devs and they came to
the conclusion it is a bug within llvm-14.
As mentioned, I've tested the same query on the same dataset with the
same version of postgresql (15.5) on the same hardware on ubuntu, with
the sole difference that ubuntu links to llvm-15 and there the query
succeeds and postgresql doesn't crash.

Just to be curious, what was the rational behind linking against the
oldest available llvm version available in the debian repos (I saw 14,
15 and 16 are provided).

Best regards, Clemens



Bug#1059476: anyone?

2024-02-06 Thread Clemens Eisserer
Hello, anyone?



Bug#1059476: postgresql-15: backend crash caused by query in llvm on arm64

2023-12-26 Thread Clemens Eisserer
Package: postgresql-15
Version: 15.5-0+deb12u1
Severity: normal
X-Debbugs-Cc: linuxhi...@gmail.com

Dear Maintainer,

I've stumbled over a reproduceable backend crash on arm64 running the following 
query on my smartmeter table,
please see the following post on pgsql-general for more details:
https://www.postgresql.org/message-id/CAFvQSYRatUx%2Bj3yeVf%3DAVRdDpXBoUNSHrxjcS02kwKQR2dODNg%40mail.gmail.com

the crash seems to be caused by a bug in llvm-14 (which debian's postgresql 
release is built against), this was suggested by upstream.
disabling the jit solved the crash, also the same query+schema works fine using 
ubuntu 23 which ships 15.4 + llvm-15.

the query:
SELECT floor(extract(epoch from ts)/60)*60 AS "time", AVG(spannungL1)
as l1, AVG(spannungL2) as l2, AVG(spannungL3) as l3 FROM smartmeter
WHERE ts BETWEEN '2023-12-01T13:01:30.514Z' AND
'2023-12-25T19:01:30.514Z' GROUP BY time order by time;SELECT 
floor(extract(epoch from ts)/60)*60 AS "time", AVG(spannungL1)
as l1, AVG(spannungL2) as l2, AVG(spannungL3) as l3 FROM smartmeter
WHERE ts BETWEEN '2023-12-01T13:01:30.514Z' AND
'2023-12-25T19:01:30.514Z' GROUP BY time order by time;

it would be therefore be great if postgresql-15 could be built against llvm >= 
15, as those are shipped with debian anyway.

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 12.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: arm64 (aarch64)
Foreign Architectures: armhf

Kernel: Linux 6.1.0-rpi7-rpi-v8 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CRAP
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to de_AT.UTF-8), LANGUAGE=de_AT.UTF-8
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)




Versions of packages postgresql-15 depends on:
ii  debconf [debconf-2.0]  1.5.82
ii  libc6  2.36-9+rpt2+deb12u3
ii  libgcc-s1  12.2.0-14
ii  libgssapi-krb5-2   1.20.1-2+deb12u1
ii  libicu72   72.1-3
ii  libldap-2.5-0  2.5.13+dfsg-5
ii  libllvm14  1:14.0.6-12
ii  liblz4-1   1.9.4-1
ii  libpam0g   1.5.2-6+rpt2+deb12u1
ii  libpq5 15.5-0+deb12u1
ii  libselinux13.4-1+b6
ii  libssl33.0.11-1~deb12u2+rpt1
ii  libstdc++6 12.2.0-14
ii  libsystemd0252.17-1~deb12u1
ii  libuuid1   2.38.1-5+b1
ii  libxml22.9.14+dfsg-1.3~deb12u1
ii  libxslt1.1 1.1.35-1
ii  libzstd1   1.5.4+dfsg2-5
ii  locales2.36-9+rpt2+deb12u3
ii  postgresql-client-15   15.5-0+deb12u1
ii  postgresql-common  248
ii  ssl-cert   1.1.2
ii  tzdata 2023c-5
ii  zlib1g 1:1.2.13.dfsg-1

Versions of packages postgresql-15 recommends:
ii  sysstat  12.6.1-1

postgresql-15 suggests no packages.

-- debconf information:
  postgresql-15/postrm_purge_data: true