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

Segmentation Fault on transaction pipeline #343

Closed
vikingUnet opened this issue Dec 20, 2022 · 6 comments
Closed

Segmentation Fault on transaction pipeline #343

vikingUnet opened this issue Dec 20, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@vikingUnet
Copy link

Describe the bug

Can't run pooler in transaction mode - get Segmentation Fault.

To Reproduce

/usr/local/bin/pgagroal -c /usr/local/etc/pgagroal/pgagroal.conf -a /usr/local/etc/pgagroal/pgagroal_hba.conf -u /usr/local/etc/pgagroal/pgagroal_users.conf
Segmentation fault

Version

1.6.0

PostgreSQL

13.5

libev

1:4.31-1

OpenSSL

1.1.1f-1ubuntu2.16

Access method

all (dfefault)

OS

20.04.1-Ubuntu

ulimit

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7584
max locked memory       (kbytes, -l) 65536
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 7584
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Configuration

Can you provide the configuration pgagroal ?

  • pgagroal.conf
[pgagroal]
host = *
port = 8432
failover = on
failover_script = /tmp/failover.sh

log_type = file
log_type = console
log_level = debug
log_path = /tmp/pgagroal.log
#log_connections = on
#log_disconnections = om

max_connections = 100
idle_timeout = 600
validation = off
unix_socket_dir = /tmp/

pipeline = transaction

[primary]
host = msherstyuk-master.spb.play.dc
port = 6001

[primary2]
host = 10.2.50.251
port = 6001
  • pgagroal_hba.conf
#
# TYPE  DATABASE USER  ADDRESS  METHOD
#
host    all      all   all      all
  • pgagroal_databases.conf
    not used
  • pgagroal_users.conf
[users]
tester "tester"

Debug logs

empty

Tip

Use ``` before and after the text to keep the output as is.

@vikingUnet vikingUnet added the bug Something isn't working label Dec 20, 2022
@jesperpedersen
Copy link
Collaborator

If you add a pgagroal_databases.conf setup does your use-case work then ?

@jesperpedersen jesperpedersen self-assigned this Dec 20, 2022
@vikingUnet
Copy link
Author

If you add a pgagroal_databases.conf setup does your use-case work then ?

Hello, jesperpedersen!

Unfortunately, there is no effect:
cat /usr/local/etc/pgagroal/pgagroal_databases.conf

#
# DATABASE USER    MAX_SIZE INITIAL_SIZE MIN_SIZE
#
tester     tester  all

Running command with additional pgagroal_databases config file:

m.sherstyuk@msherstyuk9:~$ /usr/local/bin/pgagroal -c /usr/local/etc/pgagroal/pgagroal.conf -a /usr/local/etc/pgagroal/pgagroal_hba.conf -u /usr/local/etc/pgagroal/pgagroal_users.conf -l /usr/local/etc/pgagroal/pgagroal_databases.conf
Segmentation fault

@jesperpedersen
Copy link
Collaborator

You should create pgagroal_users.conf with the pgagroal-admin tool.

https://github.com/agroal/pgagroal/blob/master/doc/tutorial/01_install.md#create-basic-configuration

@jesperpedersen
Copy link
Collaborator

There is still work left for running in transaction mode without limits defined, so I'll create an issue for that.

As such, I think we can close this issue. You can pick up the fixes by running master or 1.5.x, or waiting for the next release.

Thanks for the report !

@vikingUnet
Copy link
Author

You should create pgagroal_users.conf with the pgagroal-admin tool.

https://github.com/agroal/pgagroal/blob/master/doc/tutorial/01_install.md#create-basic-configuration

Thanks for remark, i created pgagroal_users.conf with command from pgagroal user:

pgagroal-admin -f usr/local/etc/pgagroal/pgagroal_users.conf -U tester -P tester add-user

And have pgagroal_databases.conf, but it is still Segmentation fault

@jesperpedersen
Copy link
Collaborator

Can you compile in Debug mode and run within gdb ?

Or what are your precise configuration ? I'm assuming that you are running the latest master or 1.5.x branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants