Giter Club home page Giter Club logo

Comments (31)

zhuyaliang avatar zhuyaliang commented on August 20, 2024 1

I'm going to refactor the code these days. It may take some time to give you an answer.Code refactoring will be more robust。Thank you for your participation.That's my motivation

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

Your feedback is fantastic.This is a strange phenomenon. I will try to solve it. By the way, if you run mate-user-admin directly from the command line, will there be any message prompts when he crashes?

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

Just Segmentation fault, no other messages

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123 It's a long wait.I modify the implementation of adding users,Please test to see if there are still errors in creating users now.

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

@zhuyaliang unfortunately it still segfault with the same test scenario :(

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123 I suspect this may be related to accountsservice. What is your version of accountsservice?

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

Version 0.6.55

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123 This is a strange question. Can you download the latest code and test it again? Send me the log file after the test
Whether the user created successfully after a segment error occurs (whether the user created the second time exists after the next opening)

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

@zhuyaliang The last version gets an immediate Segmentation fault. The GUI doesn't even open and no log file is created.

This is what I get in the journal logs

Jul 09 22:34:21 mate-122 audit[1187]: ANOM_ABEND auid=4294967295 uid=1000 gid=1000 ses=4294967295 subj==unconfined pid=1187 comm="mate-user-admin" exe="/usr/bin/mate-user-admin" sig=11 res=1
Jul 09 22:34:21 mate-122 kernel: mate-user-admin[1187]: segfault at 8 ip 000000000040ae62 sp 00007ffe5e6e9ab0 error 4 in mate-user-admin[409000+10000]
Jul 09 22:34:21 mate-122 kernel: Code: 0c fe ff ff 48 c7 84 24 c8 00 00 00 00 00 00 00 48 8b 44 24 10 48 8d 35 8c e2 00 00 48 8d 15 dd e1 00 00 48 8d 3d 4e e3 00 00 <48> 8b 48 08 31 c0 e8 83 60 00 00 48 8b 7c 24 10 e8 e9 e4 ff ff 31

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

Which commits did you use?This is my latest submission.
9553814

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

Oh sorry, I was still using the previous commit ( 22018c0 ).
With the last commit, the application starts but still crash. Both are Administrator users. Perhaps the issue is with group-service.

level:[Debug]  message: Created user: testuser success
level:[Debug]  message: nuLang = en_US.utf8
level:[Debug]  message: New user: testuser lang en_US.utf8
level:[Debug]  message: group name audio
level:[Debug]  message: group name cdrom
level:[Debug]  message: group name fuse
level:[Debug]  message: group name lpadmin
level:[Debug]  message: group name plugdev
level:[Debug]  message: group name scanner
level:[Debug]  message: group name users
level:[Debug]  message: group name video
level:[Debug]  message: username testuser2 realname Test User II
level:[Info]  message: mate-user-admin Current user name Pierre-Yves
level:[Debug]  message: Created user: testuser2 success
level:[Debug]  message: nuLang = en_US.utf8
level:[Debug]  message: New user: testuser2 lang en_US.utf8
level:[Debug]  message: group name audio
level:[Debug]  message: group name cdrom
level:[Debug]  message: group name fuse
level:[Debug]  message: group name lpadmin

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123 It's a group-service problem. Users have been created successfully, but there was an error when adding default groups to new users. I'll solve this problem.

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

What is your group-service version? My version is this one.
1924c9f
I can create multiple users on Ubuntu and archlinux system normally and continuously

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

Yes group-service was built from commit 1924c9ff263566330cb13db144961c95405e5691
I saw you updated group-service, so I tried again with commit 3fceeb118bcf919070bf5e631808a28c8009f00f but it didn't help

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123
What if we add a only group for new users?
for example

[nudefault]

nulanguage = en_US.utf8
nutype = 1 
nugroups =plugdev

You can try it and see if there are any problems.

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

I made many tests and for some reason it segfault with the group lpadmin, other groups aren't causing any problem.
I can even tell it crashes after successfully adding the user in the group since I see this in /etc/group:
lpadmin:x:19:py,testuser,testuser2

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

You can add users to groups using sudo groupmems -g lpadmin -a usrname command.Calling this command several times adds different users to the group.testing for problems

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123 By the way, what system do you use?

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

Adding the users in the group using the command you gave works fine

py@mate-122 ~ $ sudo useradd testuser
Creating mailbox file: No such file or directory
py@mate-122 ~ $ sudo groupmems -g lpadmin -a testuser
py@mate-122 ~ $ sudo useradd testuser2
Creating mailbox file: No such file or directory
py@mate-122 ~ $ sudo groupmems -g lpadmin -a testuser2
py@mate-122 ~ $ grep testuser /etc/group
lpadmin:x:19:py,testuser,testuser2
testuser:x:1002:
testuser2:x:1003:
py@mate-122 ~ $ grep testuser /etc/passwd
testuser:x:1001:1002::/home/testuser:/bin/bash
testuser2:x:1002:1003::/home/testuser2:/bin/bash

I am using Solus MATE

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

@zhuyaliang is there anything else I could do to help fixing this issue?

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123
Sorry, I didn't reply to you in time. You can debug with the help of GDB and send me the wrong message.

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123
ulimit -c unlimited open core dump
sudo sysctl -w kernel.core_pattern=/tmp/core-%e.%p.%h.%t Setting up core dump generation mode
Runing mate-user-admin
If a segment error occurs, the core dump is generated in the ``/tmp``` directory,Send this core to me at your convenience, and I'll see why it went wrong.
You can also debug locally

gdb mate-user-admin
run
bt
Because I have been busy with other projects recently, I haven't maintained user-admin in time.

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

Hello

Here is the gdb output

(gdb) run
Starting program: /usr/bin/mate-user-admin 
warning: File "/usr/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /usr/lib64/libthread_db-1.0.so
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[New LWP 1817]
[New LWP 1818]
[New LWP 1819]
[Detaching after fork from child process 1820]
[New LWP 1821]
[Detaching after fork from child process 1823]
[New LWP 1824]
[LWP 1824 exited]

Thread 1 "mate-user-admin" received signal SIGSEGV, Segmentation fault.
0x00007ffff7352abc in gas_group_add_user_group () from /usr/lib/libgroup-service.so.1
(gdb) bt
#0  0x00007ffff7352abc in gas_group_add_user_group () at /usr/lib/libgroup-service.so.1
#1  0x000000000040cbf2 in  ()
#2  0x000000000040cdcd in  ()
#3  0x00007ffff75dc0d9 in  () at /usr/lib/libgio-2.0.so.0
#4  0x00007ffff75dcbf3 in  () at /usr/lib/libgio-2.0.so.0
#5  0x00007ffff7385c2e in  () at /usr/lib/libaccountsservice.so.0
#6  0x00007ffff75dc0d9 in  () at /usr/lib/libgio-2.0.so.0
#7  0x00007ffff75dcbf3 in  () at /usr/lib/libgio-2.0.so.0
#8  0x00007ffff764099b in  () at /usr/lib/libgio-2.0.so.0
#9  0x00007ffff75dc0d9 in  () at /usr/lib/libgio-2.0.so.0
#10 0x00007ffff75dcbf3 in  () at /usr/lib/libgio-2.0.so.0
#11 0x00007ffff76354fa in  () at /usr/lib/libgio-2.0.so.0
#12 0x00007ffff75dc0d9 in  () at /usr/lib/libgio-2.0.so.0
#13 0x00007ffff75dc119 in  () at /usr/lib/libgio-2.0.so.0
#14 0x00007ffff74032d8 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#15 0x00007ffff74036c8 in  () at /usr/lib/libglib-2.0.so.0
#16 0x00007ffff74039c2 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#17 0x00007ffff7b5a185 in gtk_main () at /usr/lib/libgtk-3.so.0
#18 0x000000000040b05e in  ()
#19 0x00007ffff70d8c2b in __libc_start_main () at /usr/lib/libc.so.6
#20 0x000000000040b33a in  ()
(gdb) generate-core-file /tmp/mate-user.dump
Saved corefile /tmp/mate-user.dump

Note that I noticed this problem occurs when nutype is set to 1 here is my config file, so you can try with the same settings.

[nudefault]
#Default language for new users
nulanguage = en_US.utf8

#Default Type for New User, 0 Ordinary User 1 Manage User
nutype = 1    

#Default Add Groups for New Users
nugroups = audio;cdrom;fuse;lpadmin;plugdev;scanner;users;video

mate-user.dump.gz

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123
I made a test patch. Please type this patch into group-service. Then compile and install it.

run mate-user-adminAre there any errors?
cd group-service
patch -p1 < group-service-test-lpadmin.patch
meson build -Dprefix=/usr
sudo ninja -C build install
ps -efH | grep group-admin-daemon
sudo kill -9 pid
mate-user-admin
patch.tar.gz

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

Hello,

With the patch it worked fine. I got this in the console; as usual I did create 2 admins users in a row.

(mate-user-admin:1200): group-service-WARNING **: 21:16:19.905: group_name = audio
(mate-user-admin:1200): group-service-WARNING **: 21:16:24.312: group_name = cdrom
(mate-user-admin:1200): group-service-WARNING **: 21:16:24.334: group_name = fuse
(mate-user-admin:1200): group-service-WARNING **: 21:16:24.351: group_name = lpadmin
(mate-user-admin:1200): group-service-WARNING **: 21:16:24.351: lpadmin break !!!
(mate-user-admin:1200): group-service-WARNING **: 21:16:24.352: group_name = plugdev
(mate-user-admin:1200): group-service-WARNING **: 21:16:24.371: group_name = scanner
(mate-user-admin:1200): group-service-WARNING **: 21:16:24.391: group_name = users
(mate-user-admin:1200): group-service-WARNING **: 21:16:24.414: group_name = video
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.227: group_name = audio
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.252: group_name = cdrom
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.274: group_name = fuse
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.292: group_name = lpadmin
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.292: lpadmin break !!!
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.292: group_name = plugdev
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.313: group_name = scanner
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.336: group_name = users
(mate-user-admin:1200): group-service-WARNING **: 21:16:45.357: group_name = video

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123
Thank you for your feedback.
Now I'm sure that adding users to the lpadmin group will cause errors,We still need to continue testing.

cd group-service
patch -p1 < group-service-add-user-to-group.patch 
meson build -Dprefix=/usr
sudo ninja -C build install
ps -efH | grep group-admin-daemon
sudo kill -9 pid
sudo ./build/src/group-admin-daemon 

Open a new terminal and run mate-user-admin
Observe the output of group-service
patch.tar.gz
.

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

When I execute group-admin-daemon it returns Lost Lost !!!!

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123
You should use the root user to start it.

ps -efH | grep group-admin-daemon
sudo kill -9 pid
sudo ./build/src/group-admin-daemon

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

Here is the output for the 2 users

** (process:1162): WARNING **: 18:04:42.702: group-name = audio
** (process:1162): WARNING **: 18:04:42.702: add user testuser to group audio successful 
** (process:1162): WARNING **: 18:04:42.727: group-name = cdrom
** (process:1162): WARNING **: 18:04:42.727: add user testuser to group cdrom successful 
** (process:1162): WARNING **: 18:04:42.747: group-name = fuse
** (process:1162): WARNING **: 18:04:42.747: add user testuser to group fuse successful 
** (process:1162): WARNING **: 18:04:42.751: add user testuser to group lpadmin successful 
** (process:1162): WARNING **: 18:04:42.769: group-name = plugdev
** (process:1162): WARNING **: 18:04:42.770: add user testuser to group plugdev successful 
** (process:1162): WARNING **: 18:04:42.787: group-name = scanner
** (process:1162): WARNING **: 18:04:42.787: add user testuser to group scanner successful 
** (process:1162): WARNING **: 18:04:42.808: group-name = users
** (process:1162): WARNING **: 18:04:42.808: add user testuser to group users successful 
** (process:1162): WARNING **: 18:04:42.827: group-name = video
** (process:1162): WARNING **: 18:04:42.828: add user testuser to group video successful 


** (process:1162): WARNING **: 18:05:09.655: group-name = audio
** (process:1162): WARNING **: 18:05:09.655: add user testuser2 to group audio successful 
** (process:1162): WARNING **: 18:05:09.672: group-name = cdrom
** (process:1162): WARNING **: 18:05:09.672: add user testuser2 to group cdrom successful 
** (process:1162): WARNING **: 18:05:09.690: group-name = fuse
** (process:1162): WARNING **: 18:05:09.690: add user testuser2 to group fuse successful 
groupmems: user 'testuser2' is already a member of 'lpadmin'
** (process:1162): WARNING **: 18:05:09.699: running '/usr/sbin/groupmems' failed: Child process exited with code 7
groupmems: user 'testuser2' is already a member of 'lpadmin'
** (process:1162): WARNING **: 18:05:09.744: running '/usr/sbin/groupmems' failed: Child process exited with code 7
groupmems: user 'testuser2' is already a member of 'lpadmin'
** (process:1162): WARNING **: 18:05:09.780: running '/usr/sbin/groupmems' failed: Child process exited with code 7
groupmems: user 'testuser2' is already a member of 'lpadmin'
** (process:1162): WARNING **: 18:05:09.814: running '/usr/sbin/groupmems' failed: Child process exited with code 7
groupmems: user 'testuser2' is already a member of 'lpadmin'
** (process:1162): WARNING **: 18:05:09.848: running '/usr/sbin/groupmems' failed: Child process exited with code 7
groupmems: user 'testuser2' is already a member of 'lpadmin'
** (process:1162): WARNING **: 18:05:09.879: running '/usr/sbin/groupmems' failed: Child process exited with code 7

from user-admin.

zhuyaliang avatar zhuyaliang commented on August 20, 2024

@kyrios123
Let's have a try. I think the problem has been fixed.
Update the latest group-service
Latest changes

from user-admin.

kyrios123 avatar kyrios123 commented on August 20, 2024

I confirm the problem is now fixed, good job, @zhuyaliang 👍

from user-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.