Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
"/var/run/mysqld/mysqld.pid" is still present
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Sat Nov 29, 2008 10:55 am    Post subject: "/var/run/mysqld/mysqld.pid" is still present Reply with quote

Salve a tutti,

torno ad avere problemi con lo start di mysqld all'avvio del mio portatile.
La cosa stranissima è che ciò non accade sempre, quindi ciò può risultare un problema anche peggiore.

Tipicamente all'avvio ottengo questo messaggio di errore:
Code:
 * Starting mysql ...
 * Starting mysql (/etc/mysql/my.cnf)
 * MySQL NOT started (0)

Il problema è del tutto "compatibile" con quello trattato quì.
La cosa che non va bene è che l'iter che serve a completare lo start di tutti i servizi si interrompe sulla seconda delle tre righe precedenti e causa il non avvio immediato di quelli seguenti. Infatti, per far sì che l'iter continui (una volta che KDM mi si è presentato e ho fatto login) devo fare CTRL+ALT+F1 e subito riprendono tutti gli start degli init script. Ovviamente poi sono costretto a tornare su F7, per il normale utilizzo.
Inizialmente avevo circoscritto il problema modificando la funzione depend() dell'init script di mysql, facendo in modo che contenesse il nome dell'ultimo script che in genere viene avviato (nel mio caso apache), ma ora il problema si sta facendo veramente pesante.

Avviato il mio windows manager, con mysql non ancora in esecuzione, apro una shell e faccio quanto segue:
Code:
# /etc/init.d/mysql start
 * Caching service dependencies ...                                                                                                       [ ok ]
 * Starting mysql ...
 * "/var/run/mysqld/mysqld.pid" is still present and the process is running.
 * Please stop it "kill 7092" maybe ?

Poi, nuovamente, senza aver fatto nient'altro, subito dopo rifaccio la stessa cosa, et voilà:
Code:
# /etc/init.d/mysql start
 * Starting mysql ...
 * Starting mysql (/etc/mysql/my.cnf)                                                                                                     [ ok ]

Come per magia è partito senza alcun problema.

Analizzando il file /etc/init.d/mysql ho inquadrato le rige di codice 194-205 (che riporto), ed in particolare la riga 198.
Code:
if [[ -f "${pidfile}" ]] ; then
      kill -15 $(< ${pidfile}) 2>/dev/null
      if [[ $? -eq 0 ]] ; then
         # the process exist, we have a problem
         eerror "\"${pidfile}\" is still present and the process is running."
         eerror "Please stop it \"kill $(< ${pidfile})\" maybe ?"
         wdebug 4 "<<< checkconfig() KO"
         return 1
      else
         rm -f "${pidfile}"
      fi
   fi

Ora vorrei capire perché quel kill -15 [...] a volte funziona e a volte no.
Magari il problema non sta in mysql ma in qualche altra parte.

Qualcuno può aiutarmi?
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
nikko96
Apprentice
Apprentice


Joined: 22 Jul 2005
Posts: 229
Location: Pulcinella's Country

PostPosted: Tue Dec 30, 2008 7:08 pm    Post subject: Re: "/var/run/mysqld/mysqld.pid" is still present Reply with quote

Hai provato ad abilitare il debug in /etc/conf.d/mysql ?
E vedere se ti dà qualche informazione in più, ciao.
_________________
My system: cpu Intel core 2 duo e6750,mb asus p5n-e sli,scheda grafica nvidia GeForce 9600 GT,kernel 2.6.31-gentoo-r6
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Tue Dec 30, 2008 7:44 pm    Post subject: Reply with quote

sigterm termina solo i processi regolarmente attivi ma agli zombie non fa nulla ed implica un certo lasso di tempo visto che non lo "uccide" ma gli ordina di fermarsi ovvero almeno gli lascia il tempo di rilasciare tutti i file (per quel che ricordo).
Forse l'initscript dovrebbe aspettare un minimo di tempo per vedere se il processo è ancora attivo e nel caso procedere alla sua chiusura con sigkill od alla rimozione del pidfile.

per l'errore al riavvio prova ad eliminare manualmente il pidfile prima di lanciare mysql start.
_________________
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Back to top
View user's profile Send private message
fbcyborg
Advocate
Advocate


Joined: 16 Oct 2005
Posts: 3056
Location: ROMA

PostPosted: Wed Dec 31, 2008 12:27 am    Post subject: Reply with quote

Ho già provato a metterlo in debug al livello 4 ma non ho trovato nulla di particolarmente significativo.

Inoltre, al fine di assicurarmi che il mysql.pid file fosse eliminato, avevo messo un comando in /etc/conf.d/local.stop (così al riavvio successivo non ci sarebbe stato), ma la cosa non mi ha dato buoni risultati, anzi, tutt'altro.
_________________
[HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum