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

coredump with nchan_store_init_worker: Assertion `procslot_found == 1' #635

Open
DomrachevIvan opened this issue Feb 22, 2022 · 1 comment

Comments

@DomrachevIvan
Copy link

I have got errors:

src/nginx-1.20.2/objs/nginx -p /home/user/nginx -e /home/user/nginx/error -c /home/user/nginx/nginx.conf: /home/user/src/nchan-master/src/store/memory/memstore.c:723: nchan_store_init_worker: Assertion `procslot_found == 1' failed.
2022/02/22 13:41:50 [alert] 1192#0: worker process 1878 exited on signal 6 (core dumped)
2022/02/22 13:41:50 [alert] 1192#0: shared memory zone "memstore" was locked by 1878

versions:
nginx-1.20.2
nchan from current master 7994951

os:
ubuntu-21.10

steps:
setup virtual machine with new ubuntu. one processor is enough. user=user.
take clean sources of nginx and nchan.
configure: ./configure --add-module=/home/user/src/nchan-master
nginx config:

 worker_processes 16;
 error_log /home/user/nginx/error warn;
 pid /home/user/nginx/pid;
 events {}
 http {
  server {
   listen localhost:8080 default;
   access_log /home/user/nginx/access combined;
   location /laggy_backend {
    proxy_ignore_client_abort on;
    proxy_pass http://10.100.0.1;
   }
  }
 }

change 10.100.0.1 to any ip that will do very long answer (more than 60sec).
start nginx and run this script:

 #!/usr/bin/env perl
 use Socket;
 for(;;){
  print $n++."\n";
  system('kill -s hup `cat /home/user/nginx/pid`');
  socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp")) || die "socket: $!";
  connect(S,pack_sockaddr_in(8080,inet_aton('127.0.0.1'))) || die "connect: $!";
  send(S,"GET /laggy_backend/$n HTTP/1.1\r\nHost: nchan\r\nConnection: Close\r\n\r\n",0);
  sleep(1);
 }

after about 30-60 seconds i usually get coredump.

I think problem is in some factors:
1 nginx reload (sig hup)
2 many worker_processes (more than 4)
3 long backend replys

and some more notes:
no need any of nchan configs and when script is runing, process begin appear "worker process is shutting down".

@DomrachevIvan
Copy link
Author

how can i help to resolve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant