pgbackrest icon indicating copy to clipboard operation
pgbackrest copied to clipboard

when pgbackrest execute backup, press Ctrl+C, many cause core-dump

Open Wim1234 opened this issue 5 years ago • 1 comments

Please provide the following information when submitting an issue (feature requests or general comments can skip this):

  1. pgBackRest version: 2.27

  2. PostgreSQL version: 12.0

  3. Operating system/version - if you have more than one server (for example, a database server, a repository host server, one or more standbys), please specify each: CentOS7.6

  4. Did you install pgBackRest from source or from a package? Yes

  5. Please attach the following as applicable:

    • pgbackrest.conf file(s)
    • postgresql.conf settings applicable to pgBackRest (archive_command, archive_mode, listen_addresses, max_wal_senders, wal_level, port)
    • errors in the postgresql log file before or during the time you experienced the issue
    • log file in /var/log/pgbackrest for the commands run (e.g. /var/log/pgbackrest/mystanza_backup.log)
  6. Describe the issue:

    1. build pgbackrest from 2.27 source code
    2. two node, pg 12.0, one primary + one standby
    3. config the pgbackrest.conf
    4. after stanza-create, backup work normally
    5. but, when backup doing , press Ctrl+C, many cause core-dump,
    6. does not occur everytime, but about 20% possible
    7. add some log statement in the pgbackrest source-code,build and test again
    8. when core-dump, the log show: protocolClientFreeResource 0x11111111 protocolClientFreeResource 0x22222222 protocolClientFreeResource 0x33333333 memContextFree RETHROW callback:0xabababab argu: 0x33333333 dbFreeResouce DB: 0x8888888 ProtocolClient: 0x111111111

      Because protocolClient 0x111111 ALREADY released, dbFreeResouce will core-dump because access INVALID memory

    how to avoid this? why ?

Wim1234 avatar Oct 22 '20 08:10 Wim1234

It looks like the frees are running in the wrong order here. We'll have a look at it.

dwsteele avatar Oct 23 '20 13:10 dwsteele