Hi,

This problem is still happening.

On Fri, 17 Oct 2025 at 15:31, Daniel Gustafsson <[email protected]> wrote:
>
> > On 17 Oct 2025, at 14:25, Álvaro Herrera <[email protected]> wrote:
> >
> > On 2025-Oct-17, Nazir Bilal Yavuz wrote:
> >
> >> first=1
> >> -for corefile in $(find "$directory" -type f) ; do
> >> +# minfree is not a core file but may exists in the crash directory, skip 
> >> it
> >> +for corefile in $(find "$directory" -type f -not -name "minfree") ; do
> >>     if [ "$first" -eq 1 ]; then
> >>         first=0
> >>     else
> >
> > This looks quite random.  Why not do "find ... -name '*core*'" instead?
> > I mean, if we have minfree there today, we could have maxbusy tomorrow
> > or whatever.
>
> I think we should be able to count of the core directory on controlled CI
> instances not being cluttered with random files - if it is we probably want a
> test failure logged so we can look at it - but minfree is a special file for
> core dump handling on some platforms so skipping that make sense I think.

I see that we already search for *core* string in the
cores_backtrace.sh script (we do it only for OpenBSD but I think it
doesn't matter):

```
base=$(echo "$filename" | sed 's/\.core.*$//')
```

So, I wanted to continue with Álvaro's suggestion. v2 is attached.

Example CI run: https://cirrus-ci.com/build/6447813132812288


--
Regards,
Nazir Bilal Yavuz
Microsoft
From 8966650c083d786bc85e303569f95ca4f7fcb42b Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <[email protected]>
Date: Tue, 7 Apr 2026 13:00:37 +0300
Subject: [PATCH v2] ci: Process only core dump files in cores_backtrace.sh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The crash directory may contain files other than core dumps, such as
"minfree". The cores_backtrace.sh script previously attempted to process
these files; it now processes only core dump files.

Reported-by: Melanie Plageman <[email protected]>
Author: Christoph Berg <[email protected]>
Author: Nazir Bilal Yavuz <[email protected]>
Reviewed-by: Daniel Gustafsson <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Reviewed-by: Nazir Bilal Yavuz <[email protected]>
Discussion: https://postgr.es/m/CAN55FZ12R-LG%3DwZZ8yLY7%2BtmVbR%3D9Y_O5uveDHU0nmYT%2BAiTjQ%40mail.gmail.com
---
 src/tools/ci/cores_backtrace.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/ci/cores_backtrace.sh b/src/tools/ci/cores_backtrace.sh
index cb325f21156..a1a14dd0658 100755
--- a/src/tools/ci/cores_backtrace.sh
+++ b/src/tools/ci/cores_backtrace.sh
@@ -28,7 +28,7 @@ if [ "$os" = 'openbsd' ]; then
 fi
 
 first=1
-for corefile in $(find "$directory" -type f) ; do
+for corefile in $(find "$directory" -type f -name '*core*') ; do
     if [ "$first" -eq 1 ]; then
         first=0
     else
-- 
2.47.3

Reply via email to