Re: [gdm-list] Help with GDM 2.20.2: gdm ignoring custom server config




Martin:

I tried your patch, the ChangeLog did not patch smoothly but no
matter, the source itself did.

It's not a problem if the ChangeLog part of the patch didn't apply.
As long as the other sections applied okay.

However, the patch gdm dies with a seg fault in parsing the config in
gdm-daemon-config.c at line 1211 in load_xservers_group().  I compiled
with debug to see if there was something obvious to me.  Does this
help?  I don't think this is on my end (e.g. in the patching).  The
loop looks like:

I don't see any crashing problems here, but sometimes crashing problems
can be OS-speicifc.

You don't specify which line in the loop is line 1211.  In my copy of
the file it is the gdm_config_entry_free line, but I suspect it is a
different line in your file (since that would be an odd line for it
to crash on just by looking at the code).

Also, could you try running gdm in the debugger and see if it gives any
further info about what is causing the crash?  Since the crash is
happening early it is probably a situation where you can actually run
GDM in a debugger and get some useful information.  This isn't always
the case, since GDM forks into slave daemons - so it is harder to use
the debugger to find issues after such forks happen.

So, what I'd recommend doing is:

1) Run gdm-binary (not the gdm script) in the debugger like this:
   gdb /usr/sbin/gdm-binary
   run --nodaemon

   The --nodaemon argument tells gdm-binary not to fork immediately
   which is what you want when debugging.

2) Then it should crash and tell you that the SEGV happened and drop
   you into a prompt.  Try printing out various values like run
   "print srv_entry" and see if the group variable is NULL or something
   causing a crash when we try to access srv_entry->group.

			for (j = 0; j < G_N_ELEMENTS (gdm_daemon_server_config_entries); j++) {
				GdmConfigEntry *srv_entry;
				if (gdm_daemon_server_config_entries[j].key == NULL) {
					continue;
				}
				srv_entry = gdm_config_entry_copy (&gdm_daemon_server_config_entries[j]);
				g_free (srv_entry->group);
				srv_entry->group = xserver_group;
				gdm_config_process_entry (config, srv_entry, NULL);
				gdm_config_entry_free (srv_entry);
			}


BTW, the [servers] section in my gdm.conf is default, that is to say,
empty.

It would be helpful if you could run these commands:

gdmflexiserver --command=GET_CONFIG_FILE
gdmflexiserver --command=GET_CUSTOM_CONFIG_FILE

And send me these two files as attachments.  Perhaps the crash is
triggered by how your [servers] and [server-foo] sections are set up.
If you can send me your files, I can see if I can trigger the crash
on my system using your style of configuration.

Brian


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]