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

Fix the doc #40

Merged
merged 5 commits into from
Sep 30, 2020
Merged

Fix the doc #40

merged 5 commits into from
Sep 30, 2020

Conversation

jfsmig
Copy link

@jfsmig jfsmig commented Jan 20, 2020

Many misleading information.

@jfsmig jfsmig requested a review from fvennetier January 20, 2020 10:49
@jfsmig jfsmig self-assigned this Jan 20, 2020
Copy link
Member

@fvennetier fvennetier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for the example.
Not OK for getting rid of the documentation!

gridinit.conf Show resolved Hide resolved
@irevoire
Copy link

I was trying to compile this project and I noticed that libtool was not specified in the dependencies but was needed to build libdill.

I think we could add this in this PR instead of doing a new one.

@irevoire
Copy link

Ok so I was noticing a strange thing that was not happening on the master branch.
It look like the daemon is dying after the first call of gridinit_cmd.
I did a full install from scratch so you can see my exact setup:

$ pkg install gmake cmake gcc libevent glib libtool pkgconf autoconf automake git # all the deps for freeBSD
...
$ git clone https://github.com/open-io/gridinit
...
$ cd gridinit
$ git pull https://github.com/jfsmig/gridinit.git -- M-doc-20200120
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 10 (delta 7), reused 10 (delta 7), pack-reused 0
Unpacking objects: 100% (10/10), done.
From https://github.com/jfsmig/gridinit
 * branch            M-doc-20200120 -> FETCH_HEAD
Updating d8104ec..b10f6e7
Fast-forward
 README.md       | 20 ++++++++++++++++++++
 gridinit.conf   | 78 ++++++++++++++++++++++++++++++------------------------------------------------
 main/gridinit.c |  2 +-
 3 files changed, 51 insertions(+), 49 deletions(-)
$ cmake -D CMAKE_C_COMPILER=gcc -D GRIDINIT_SOCK_PATH=/tmp/gridinit.sock .
...
$ make -j4
...
$ ./gridinit -d ./gridinit.conf
1579535175.872 71296 2C2A log INF gridinit reconfigure : loading main parameters from section [Default]
1579535175.907 71296 2C2A log INF gridinit reconfigure : managing service section [service.key-down]
1579535175.907 71296 2C2A log INF gridinit reconfigure : managing service section [service.key-disabled]
1579535175.907 71296 2C2A log INF gridinit reconfigure : managing service section [service.key1]
1579535175.908 71296 2C2A log NOT gridinit Service file pattern matched no file!
1579535175.908 71296 2C2A log INF gridinit Configuration loaded from [./gridinit.conf]
$
$ ./gridinit_cmd status
KEY  STATUS      PID GROUP
$
$ ./gridinit_cmd status
Connection to UNIX socket [/tmp/gridinit.sock] failed : Connection refused
$
$ ps aux
USER   PID %CPU %MEM  VSZ  RSS TT  STAT STARTED    TIME COMMAND
root 56179  0.0  0.0 6412 1856  -  SsJ  16:19   0:00.01 /usr/sbin/syslogd -ss
root 56235  0.0  0.0 6464 1848  -  IsJ  16:19   0:00.01 /usr/sbin/cron -J 60 -s
root 56261  0.0  0.0 6952 2160  0  IJ   16:19   0:00.01 login [pam] (login)
root 56265  0.0  0.0 7412 2984  0  SJ   16:19   0:00.12 -csh (csh)
root 71309  0.0  0.0 6912 2352  0  R+J  16:47   0:00.00 ps aux

@irevoire
Copy link

Here is another view of my problem:
In my first terminal I run:

130 irevoire@ovh ~/perso/M-doc-20200120 🌷 % ./gridinit  ./gridinit.conf                                                                                     [M-doc-20200120]:(
1579624100.840 41264 2C2A log INF gridinit reconfigure : loading main parameters from section [Default]
1579624100.841 41264 2C2A log INF gridinit reconfigure : managing service section [service.key-down]
1579624100.841 41264 2C2A log INF gridinit reconfigure : managing service section [service.key-disabled]
1579624100.841 41264 2C2A log INF gridinit reconfigure : managing service section [service.key1]
1579624100.841 41264 2C2A log NOT gridinit Service file pattern matched no file!
1579624100.841 41264 2C2A log INF gridinit Configuration loaded from [./gridinit.conf]

Notice I did not use the -d option so this time we’ll be able to see the errors.

On a second terminal:

irevoire@ovh ~/perso/M-doc-20200120 🐄 % ./gridinit_cmd status                                                                                                 [M-doc-20200120]
KEY  STATUS      PID GROUP

And now on the first terminal I get:

1579624100.842 41264 2C2A log INF gridinit Starting service [key1] with pid 41265
[1]    41264 segmentation fault (core dumped)  ./gridinit ./gridinit.conf

@jfsmig
Copy link
Author

jfsmig commented Sep 30, 2020

@irevoire This has been reproduced. A fix is on the way, it sems related to the usage of trampolines for nested functions used as callbacks (function pointers). It supersedes #42 by the way (since the fix gets rid of any nested func).

@jfsmig jfsmig merged commit dc5b3f6 into open-io:master Sep 30, 2020
@jfsmig jfsmig deleted the M-doc-20200120 branch October 26, 2020 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants