[so] [Tema2][Linux] Erori in client

Andrei Draga andreidraga at yahoo.com
Sun Apr 8 23:40:13 EEST 2012


Cand rulez : ./run_all.sh 
primesc
                        = Testing - Cryptography =

(client.c, 104): mq_open: Cannot allocate memory
(client.c, 104): mq_open: Cannot allocate memory
01) Testing test 1..........................................failed  [ 0/130]
(client.c, 104): mq_open: Cannot allocate memory
(client.c, 104): mq_open: Cannot allocate memory
02) Testing test 2..........................................failed  [ 0/130]
(client.c, 104): mq_open: Cannot allocate memory
(client.c, 104): mq_open: Cannot allocate memory


Imi dati linia 104 din client.c ? ( glumesc, un hint ? )


( apare 130 ca am mai creat eu teste - nu e aceea problema )



________________________________
 From: "so-request at cursuri.cs.pub.ro" <so-request at cursuri.cs.pub.ro>
To: so at cursuri.cs.pub.ro 
Sent: Sunday, April 8, 2012 11:22 PM
Subject: so Digest, Vol 71, Issue 23
 
Send so mailing list submissions to
    so at cursuri.cs.pub.ro

To subscribe or unsubscribe via the World Wide Web, visit
    http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
or, via email, send a message with subject or body 'help' to
    so-request at cursuri.cs.pub.ro

You can reach the person managing the list at
    so-owner at cursuri.cs.pub.ro

When replying, please edit your Subject line so it is more specific
than "Re: Contents of so digest..."


Today's Topics:

   1. Calendar laboratoare SO (Irina Preșa)
   2. Re: [Tema2][Linux] Problema decriptari consecutive
      (Alexandra Ghecenco)
   3. Tema 3 linux nelamuriri (Stanciu Alexandru)
   4. Re: Tema 3 linux nelamuriri (Ghennadi Procopciuc)
   5. Re: Tema 3 linux nelamuriri (Alexandru Juncu)
   6. [Tema2][Linux]  gateway (Adil Serroukh)
   7. Re: [Tema2][Linux] gateway (Alexandru Petrisor Pajarcu)
   8. Re :  [Tema2][Linux] gateway (Adil Serroukh)


----------------------------------------------------------------------

Message: 1
Date: Sun, 8 Apr 2012 14:47:07 +0300
From: Irina Preșa <irina.presa at gmail.com>
Subject: [so] Calendar laboratoare SO
To: Sisteme de Operare <so at cursuri.cs.pub.ro>
Message-ID:
    <CAFovW94pwra-0H8B+GLPCMPUJwj-sMHMdovGMW6BrRGjnCGUQQ at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Salut!

Ca un scurt reminder (pentru că au întrebat mai multe persoane),
conform planificării din calendar [1], nu se vor ține laboratoarele de
SO în datele de 12, 13 și 16 aprilie.

[1] http://elf.cs.pub.ro/so/wiki/calendar

--
Irina


------------------------------

Message: 2
Date: Sun, 08 Apr 2012 15:22:25 +0300
From: Alexandra Ghecenco <alexandra.ghecenco at gmail.com>
Subject: Re: [so] [Tema2][Linux] Problema decriptari consecutive
To: Sisteme de Operare <so at cursuri.cs.pub.ro>
Message-ID: <4F818301.3030704 at gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 04/08/2012 12:50 AM, Razvan Crainea wrote:
> On Fri, Apr 6, 2012 at 9:28 PM, Alexandra Ghecenco
> <alexandra.ghecenco at gmail.com>  wrote:
>> Buna,
>>
>> Am o problema bizara la decriptari consecutive pe aceleasi date. Am
>> constatat-o facand debug pentru alte probleme legate tot de decriptare (bad
>> magic number, bad decrypt etc).
>> De exemplu:
>>
>> student at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> student at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> student at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> teststudent at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> teststudent at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> teststudent at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> student at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> teststudent at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> student at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> student at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> student at spook:~/2/src$ ./client "test" "mq_test" 1 2 3 4 3 2 1 -1
>> ^C
>> student at spook:~/2/src$
>>
>> La ultima rulare, a dat seg fault in gateway. De fiecare data cand a gresit
>> decriptarea, in cel putin unul din server-ele 2, 3 si 4 aparea:
>>   digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:330:
>>
>> Are cineva vreo idee de ce se intampla asa? :)
>>
>   Bună, Alexandra!
>
> Ai verificat [1]?
>
> [1] http://elf.cs.pub.ro/so/wiki/teme/tema-2#faq
>
Buna!

Da, am verificat, citesc cati octeti trebuie, iar inainte sa scriu 
zero-izez ca sa nu ramana in plus (si oricum scriu dimensiunea sirului 
inainte de sirul propriu-zis, deci stiu cat am de citit). Ceea ce nu 
reusesc sa-mi explic e de ce *uneori* functioneaza si alteori nu. Daca 
facea ceva gresit, nu ar fi trebuit sa dea eroare la decriptare de 
fiecare data?

Multumesc!


------------------------------

Message: 3
Date: Sun, 8 Apr 2012 05:44:30 -0700 (PDT)
From: Stanciu Alexandru <the_marian_2006 at yahoo.com>
Subject: [so] Tema 3 linux nelamuriri
To: "so at cursuri.cs.pub.ro" <so at cursuri.cs.pub.ro>
Message-ID:
    <1333889070.75784.YahooMailNeo at web122103.mail.ne1.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Nu inteleg cu ce dimensiune sa creez fisierele ram si swap si ce o sa se scrie in ele. La ce se refera dimensiunea unei pagini? 4k? Eu am creat fisierele alea si le-am trunchiat la num_frames * sizeof(frame), unde frame e structura aceeea din enunt si ma gandeam ca pt fiecare pagina fizica alocata, sa modific in acel fisier campul w_size_t index sau mai stiu eu ce. Puteti sa fiti mai expliciti va rog in legatura cu dimensiunea unei pagini si cu ce o sa se completeze? 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20120408/4935a132/attachment-0001.html>

------------------------------

Message: 4
Date: Sun, 8 Apr 2012 17:25:24 +0300
From: Ghennadi Procopciuc <unix140 at gmail.com>
Subject: Re: [so] Tema 3 linux nelamuriri
To: Stanciu Alexandru <the_marian_2006 at yahoo.com>,    Sisteme de Operare
    <so at cursuri.cs.pub.ro>
Message-ID:
    <CAP7O53Mp3NePPjM_1zM3CbVGMzo=ubSNdF3pw4iAu1FPwZ0v-w at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Salut Alexandru !

> Nu inteleg cu ce dimensiune sa creez fisierele ram si swap si ce o sa se
> scrie in ele.

Cum e sugerat si in imaginea din tema, fiserul RAM va avea dimensiunea
nr_frames * page_size, si swap-ul nr_pages * page_size. In fisierul
RAM se vor "scrie" paginile fizice, in swap paginile obtinute in urma
operatiie de swap-in / swap-out, pagini care nu le mai poti aloca pe
RAM.

> La ce se refera dimensiunea unei pagini? 4k?
Enunt :
Puteți determina dimensiunea unei pagini folosiți funcția
w_get_page_size definită în fișierul header common.h.

> cu ce o sa se completeze?
O pagina / frame contine _doar_ date efective, nimic altceva.
Gestionarea paginilor o faci cu ajutorul structurilor de date.

--

Numai bine,

Ghennadi Procopciuc


------------------------------

Message: 5
Date: Sun, 8 Apr 2012 17:31:01 +0300
From: Alexandru Juncu <alexj at rosedu.org>
Subject: Re: [so] Tema 3 linux nelamuriri
To: Stanciu Alexandru <the_marian_2006 at yahoo.com>,    Sisteme de Operare
    <so at cursuri.cs.pub.ro>
Message-ID:
    <CAPhGq=ZJgPDenGzaizppUp8GyoSgv5vKJz+kqESdjTsMaZmY7Q at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

2012/4/8 Stanciu Alexandru <the_marian_2006 at yahoo.com>:
> Nu inteleg cu ce dimensiune sa creez fisierele ram si swap si ce o sa se
> scrie in ele. La ce se refera dimensiunea unei pagini? 4k? Eu am creat
> fisierele alea si le-am trunchiat la num_frames * sizeof(frame), unde frame
> e structura aceeea din enunt si ma gandeam ca pt fiecare pagina fizica
> alocata, sa modific in acel fisier campul w_size_t index sau mai stiu eu ce.
> Puteti sa fiti mai expliciti va rog in legatura cu dimensiunea unei pagini
> si cu ce o sa se completeze?

Vei seta mărimea RAM-ului și a swap-ului virtual cu vm_alloc.
Checker-ul va apela vm_alloc pentru a stabili valorile respective.


------------------------------

Message: 6
Date: Sun, 8 Apr 2012 19:56:26 +0100 (BST)
From: Adil Serroukh <adil.serroukh at yahoo.com>
Subject: [so] [Tema2][Linux]  gateway
To: Sisteme de Operare <so at cursuri.cs.pub.ro>
Message-ID:
    <1333911386.92122.YahooMailNeo at web29110.mail.ird.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Salut,

La mine tema pe linux rulata pe checker-ul in masina locala o data trece 2 teste alteori nimic.

Am adaugat un sleep 1 inante de # start gateway si de # start clients in 
run_test.sh si trece toate testele.
Pe vmchecker nu afiseaza nimic ramine in faza :

checker: testing

                        = Testing - Cryptography =

Primul lucru care fac in gateway.c e sa deschid coada gateway.
Deci e obligatoriu sa verific coada daca exista chiar daca gateway ruleaza 
inainte de clienti? Sau gresesc in alta  parte?



Multumesc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20120408/55366f44/attachment.htm>

------------------------------

Message: 7
Date: Sun, 8 Apr 2012 22:34:17 +0300
From: Alexandru Petrisor Pajarcu <pajarcu.petre at gmail.com>
Subject: Re: [so] [Tema2][Linux] gateway
To: Adil Serroukh <adil.serroukh at yahoo.com>,    Sisteme de Operare
    <so at cursuri.cs.pub.ro>
Message-ID:
    <CAEC-Mzt=boo+iymO4fjPuViaPdktHRV5KTK4REH0iZKSdjvtOg at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Salut,

Incearca sa pui sleep  1 in codul din gateway primul lucru din main.
Ar trebui sa aiba acelasi efect ca cel din run_test.sh.

La mine a avut efect. Aveam aceeasi problema ca tine.

Petre

2012/4/8 Adil Serroukh <adil.serroukh at yahoo.com>

> Salut,
>
> La mine tema pe linux rulata pe checker-ul in masina locala o data trece 2
> teste alteori nimic.
> Am adaugat un sleep 1 inante de # start gateway si de # start clients in
> run_test.sh si trece toate testele.
> Pe vmchecker nu afiseaza nimic ramine in faza :
>
> checker: testing
>
>                         = Testing - Cryptography =
>
> Primul lucru care fac in gateway.c e sa deschid coada gateway.
> Deci e obligatoriu sa verific coada daca exista chiar daca gateway ruleaza
> inainte de clienti? Sau gresesc in alta  parte?
>
>
>
> Multumesc
>
>
> _______________________________________________
> http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20120408/ac6f8333/attachment.htm>

------------------------------

Message: 8
Date: Sun, 8 Apr 2012 21:22:07 +0100 (BST)
From: Adil Serroukh <adil.serroukh at yahoo.com>
Subject: [so] Re :  [Tema2][Linux] gateway
To: Alexandru Petrisor Pajarcu <pajarcu.petre at gmail.com>,    Sisteme de
    Operare <so at cursuri.cs.pub.ro>
Message-ID:
    <1333916527.19226.YahooMailNeo at web29111.mail.ird.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"





________________________________
De : Alexandru Petrisor Pajarcu <pajarcu.petre at gmail.com>

Salut,

Incearca sa pui sleep  1 in codul din gateway primul lucru din main.
Ar trebui sa aiba acelasi efect ca cel din run_test.sh.

La mine a avut efect. Aveam aceeasi problema ca tine.

Petre


Inseamna ca  doar ai deschis coada gateway  in   gateway.c , nu ai creat-o  acolo ?
La cum am facut  ideal ar fi sa  am un delay la client  sa ruleze  dupa ce  stiu ca  gateway-ul a terminat executia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20120408/99ec1acd/attachment.htm>

------------------------------

_______________________________________________
so mailing list
so at cursuri.cs.pub.ro
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so


End of so Digest, Vol 71, Issue 23
**********************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20120408/21586471/attachment-0001.htm>


More information about the so mailing list