SHAREDMEMADDRESS BDE Configuration Parameter
Borland Database Engine (BDE) is a data access technology introduced by Borland a long time ago with Borland C++ and later on used by Delphi as a way of unifying access to DB data sources. At that time it had some interesting features that gave it some edge over ODBC for instance. For instance, if you followed some best practices, you were able to write applications accessing heterogeneous DB with the same client code (fat clients were common at the time). Also data access was fast, as Delphi was and still is (for Win32 applications). Over the time additional data access technologies surfaced but many legacy applications were kept accessing data over BDE native drivers. Incompatibilities can start to appear with new OS. Also, BDE is a Black Box. Documentation is scarce and it is no longer supported (so if you are using newer databases, chances are that you cannot access some of its new features or that somethings that worked before on previous DB engines do not work with the new versions. So when you or a customer decides to upgrade a DB, careful analysis and testing has to be performed.
After a long period of analysing stability problems of custom apps at a customer I have found the reason for some random errors "$210D: Shared Memory Conflict" occurring on Windows Server 2008 (that did not occur on another deployment server Windows 2003). The reason was traced to the address space layout randomization (ASLR) mechanism. For Windows, ASLR appeared first on Vista and aimed to introduce some randomness into the load address of some specially marked EXEs and DLLs (with the ASLR bit on) into the 32-bit address space of a Win32 process. For these operating systems some of OS DLLs are already marked with those flags. I am talking of DLLs like NTDLL.DLL, KERNEL32.DLL, etc.
To make a very long story short:
- BDE by default is configured to allocate the shared memory buffer it uses at 6BDE (0x6BDE0000, for Windows NT and above). This is inside the region used by the ASLR mechanism (above 0x50000000). This address is controlled by the SHAREDMEMADDRESS changeable in the BDE Administrator Control Panel applet or in the registry ([HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Database Engine\Settings\SYSTEM\INIT] key).
- Every time a reboot is performed on the server a new randomization occurs and DLLs can from then on start to load on a different zone than the preferred load address. If a DLL is loaded into the 6BDE zone (or whatever address is set in SHAREDMEMADDRESS above 5000) then BDE tries to allocate the SHAREDMEMSIZE buffer into another region and typically succeeds. I haven't reached to the point of fully understanding the algorithm used for this rellocation since I was not given enough effort to debug this BDE behaviour (assembly).
- When in the same BDE client (i.e. same Windows Session on a PC with BDE installed locally) you open a second BDE app it will never be able to locate successfully the shared memory block in the rellocated address and will fail miserably with the "$210D: Shared memory conflict". Again I did not fully understand why this failure occurs (i.e. what kind of search is done and why it fails to locate a block of memory previously allocated by the same BDE code). A little more time spent debugging this should allow a full comprehension of this issue. But the customer needed a quick fix, so I had to move on.
The solution:
First list all BDE applications that a specific user will use. Using some memory mapping tool like VMMap, analyse all your BDE applications for a specific user. Find a region out of the ASLR region (below 0x50000000 minus the shared memory size configured in the BDE Admin) that is not being used consistently for every application. Notice that Delphi apps load at a preferred address (AFAIR 0x40000000) by default and this can be changed in Delphi compiler options. Also notice that old DLLs like BDE ones (IDAPI32.DLL) are not marked with the ASLR bit and as such they load at the preferred address stated in the file (PFE), unless another DLL is already loaded there.
After that analysis is done choose a valid address for SHAREDMEMADDRESS like 3BDE. But let me explain which addresses are valid addresses: Valid values for Windows NT and above are from 1000 to 7F00 but, as you have seen, if you are using Vista, Windows Server or any other OS that has the ASLR mechanism working, do NOT leave this setting at its default setting 6BDE. It could be a matter of time before you start having these errors reported from the users. The worst thing is that you will not be able to reproduce the issue easily on other test machines.
To locate the BDE shared memory location in VMMap, look for a block of memory with the indicated SHAREDMEMSIZE (if needed, close all BDE apps and change SHAREDMEMSIZE to a unique value so that you are able to spot it from other blocks).
I was able to reproduce this error in XP (SP2) by doing the reverse procedure and this was important to conclude that the reason for the error had been found. To reproduce the error you can follow this steps: Analyse the memory map for a BDE app, locate a DLL with the ASLR bit off (like IDAPI32.DLL) and take note of its load address. If it is in the valid range for SHAREDMEMADDRESS values (described above) configure this parameter to the same value. If not choose another DLL in the same conditions. Close all BDE applications. Open the first one and notice that the shared memory block is not being allocated at the configured address because it collides with that DLL (I have described how above). Open the same BDE application again and the $210D error will surface even in XP.
Note: ProcMon will allow you to detect if a process is ASLR activated or not (add the right column to the DLLs list for instance).
SHAREDMEMSIZE
Oh and BTW, if the error "$2501: Insufficient memory for this operation" is appearing to some of other users, increase the SHAREDMEMSIZE to 8192 or even a greater value (the maximum is 60000K; the minimum and default is 2048). Each BDE app consumes a fixed part of this shared memory buffer and a bigger buffer will allow for more applications to be open at the same time. This will increase each BDE EXE footprint in the OS after being loaded into memory but this should not be a problem if you have still enough virtual memory available in the OS. Another interesting thing i have discovered in the process was that by using the maximum value for SHAREDMEMSIZE I managed to open the maximum number of simultaneous BDE clients in a Windows session: 48. This was something I have also learned during this time. The limit to the number of BDE apps that can be opened at the same time is described in the "BDE Limits" help topic of BDEADMIN.HLP.
I leave you with a tip: Migrate this BDE apps to newer technologies ASAP.
You'll be doing yourself and your customer a big favor. Problems are around the corner and if you have to spot them by yourself you are alone in the dark (no support, no technical documentation, no source code, etc).
For details on these BDE parameters and another ones you can look at the BDEADMIN.HLP help file.
quarta-feira, 23 de dezembro de 2009
What I have learned in 6 weeks at Romania
For professional reasons I had to spend some time at Romania. Before the cache clears out I wrote some notes for posterity.
What I have learned in 6 weeks in Romania:
- Romanian is similar to Portuguese. Both are Latin languages (this I knew before). Even like that you have a hard time understanding what they are saying. Maybe with some more time and some investigation on sounds and common connecting words things are easier. The written form it is said to be easier to understand but I haven't tested this yet.
- There is no google news for Romania as we have for PT.
- The Romanian guys I knew are nice people but in their own words most Romanian are rude and poorly educated.
- Family violence seems to be even more common than in PT. And guess who wins the stats for aggression: Men.
- There are more women than men. Men have emigrated.
- Travelling in the subway is safe and nice to the sight :) women take care of themselves even for the most casual occasions.
- Food is nice, similar to Portuguese when compared. Not so healthy though.
- Fish is rare and expensive. They have a river fish and several strange species (to me).
- Plastic money are not credit cards. Paper money is made from plastic and has always a transparent part.
- Food is cheap (when compared to portugal - average meal for 7€).
- Beer is abailable at 0.5l portions or greater. No "minis" (20cl).
- S i l v a is a Romanian brand of beer.
- Caru cu bere is one of the finest places to dinner.
- Papanaçi is a nice dessert.
- Bucharest is huge, grey and its streets are not very well preserved.
- No highways out of Bucharest, as in Portugsl 20 years ago.
- Buildings from the communist period are not preserved at all and are ugly, grey and falling apart. In Portugal owners would be notified for making recuperation in a timely fashion and If they wouldn't abide they would lose ownership to the city hall or be demolished.
- Streets do have holes. Sometimes there are craters on them.
- The house of Ceausescu is the second largest building in the world after the Pentagon.
- There is an underground tunnel from one face to another.
- There are several underground levels some of them not yet finished.
- The parliament operates on part of it.
- Buildings around belonged to some of the secret police people and are now dedicated to national institutes.
- Most of the cars are old, very old. Lots of Dacia (similar to old Renaults).
- Bucharest is a busy city (lots of traffic).
- Air polution is a real problem - I was not used to it at the start.
- There are lots of Dacia cars which now still belongs to the Renault group.
- There is no public connection by subway from the airport to the city centre.
- The Otopeni airport departures zone is small: one corridor only.
- At summer it is hot and dry. At winter it is really cold! Portugal rarely goes below zero.
- As a consequence, houses are very well isolated. Finishing details are not very well crafted for what i've seen (but for what I've seen at Macau, not worse).
- It is said that there are lots of corruption.
- August is a bad time to visit because all the bad Romanians come back to their homes to visit families and the bad guys at prison (to be confirmed).
- If you are investing or buying everyone will try to sell you something (to get a comission?).
- Cars are cheap: They are not heavily taxed by the government like in PT where they put VAT over a government tax (also illegal in the UE as it is said).
- The main church is the Christian Orthodox church.
- It is common that when crossing a church door people make the cross sign on themselves for 3 times. Even younger people do this.
- An high percentage of the population is gipsy. Lots of them are still nomads (unlike in Portugal where some of them are
- Generally speaking: Romanian girls are skinny, at least to say. And they do take care of their appearence. I've seen some fat ones but obesity is definitely not a national problem there... yet (as it starts to be in Portugal). McDonalds and other plastic junk food starts to reign there.
- I found everyone still marked by the communist period. It was only in 1989 that freedom came and as such, younger people than me are marked by those events which for me is strange. I don't remember living in the dictatorship period in Portugal because... I was not in Portugal at that time.
- During the communist period everything was produced internally at Romania: cars, equipments, etc. After the end of this period some industries were abandoned.
- During the communist period electricity was sometimes cut at night.
- In Bucharest, enormous amounts of land were kept reserved to city parks with lakes, trees, bike trails, etc.
If I remember some more things I'll post them here.
If you feel anything is offensive or not true please let me know. I might be wrong or have had a wrong perception of the things there. Also, my English could be better.
What I have learned in 6 weeks in Romania:
- Romanian is similar to Portuguese. Both are Latin languages (this I knew before). Even like that you have a hard time understanding what they are saying. Maybe with some more time and some investigation on sounds and common connecting words things are easier. The written form it is said to be easier to understand but I haven't tested this yet.
- There is no google news for Romania as we have for PT.
- The Romanian guys I knew are nice people but in their own words most Romanian are rude and poorly educated.
- Family violence seems to be even more common than in PT. And guess who wins the stats for aggression: Men.
- There are more women than men. Men have emigrated.
- Travelling in the subway is safe and nice to the sight :) women take care of themselves even for the most casual occasions.
- Food is nice, similar to Portuguese when compared. Not so healthy though.
- Fish is rare and expensive. They have a river fish and several strange species (to me).
- Plastic money are not credit cards. Paper money is made from plastic and has always a transparent part.
- Food is cheap (when compared to portugal - average meal for 7€).
- Beer is abailable at 0.5l portions or greater. No "minis" (20cl).
- S i l v a is a Romanian brand of beer.
- Caru cu bere is one of the finest places to dinner.
- Papanaçi is a nice dessert.
- Bucharest is huge, grey and its streets are not very well preserved.
- No highways out of Bucharest, as in Portugsl 20 years ago.
- Buildings from the communist period are not preserved at all and are ugly, grey and falling apart. In Portugal owners would be notified for making recuperation in a timely fashion and If they wouldn't abide they would lose ownership to the city hall or be demolished.
- Streets do have holes. Sometimes there are craters on them.
- The house of Ceausescu is the second largest building in the world after the Pentagon.
- There is an underground tunnel from one face to another.
- There are several underground levels some of them not yet finished.
- The parliament operates on part of it.
- Buildings around belonged to some of the secret police people and are now dedicated to national institutes.
- Most of the cars are old, very old. Lots of Dacia (similar to old Renaults).
- Bucharest is a busy city (lots of traffic).
- Air polution is a real problem - I was not used to it at the start.
- There are lots of Dacia cars which now still belongs to the Renault group.
- There is no public connection by subway from the airport to the city centre.
- The Otopeni airport departures zone is small: one corridor only.
- At summer it is hot and dry. At winter it is really cold! Portugal rarely goes below zero.
- As a consequence, houses are very well isolated. Finishing details are not very well crafted for what i've seen (but for what I've seen at Macau, not worse).
- It is said that there are lots of corruption.
- August is a bad time to visit because all the bad Romanians come back to their homes to visit families and the bad guys at prison (to be confirmed).
- If you are investing or buying everyone will try to sell you something (to get a comission?).
- Cars are cheap: They are not heavily taxed by the government like in PT where they put VAT over a government tax (also illegal in the UE as it is said).
- The main church is the Christian Orthodox church.
- It is common that when crossing a church door people make the cross sign on themselves for 3 times. Even younger people do this.
- An high percentage of the population is gipsy. Lots of them are still nomads (unlike in Portugal where some of them are
- Generally speaking: Romanian girls are skinny, at least to say. And they do take care of their appearence. I've seen some fat ones but obesity is definitely not a national problem there... yet (as it starts to be in Portugal). McDonalds and other plastic junk food starts to reign there.
- I found everyone still marked by the communist period. It was only in 1989 that freedom came and as such, younger people than me are marked by those events which for me is strange. I don't remember living in the dictatorship period in Portugal because... I was not in Portugal at that time.
- During the communist period everything was produced internally at Romania: cars, equipments, etc. After the end of this period some industries were abandoned.
- During the communist period electricity was sometimes cut at night.
- In Bucharest, enormous amounts of land were kept reserved to city parks with lakes, trees, bike trails, etc.
If I remember some more things I'll post them here.
If you feel anything is offensive or not true please let me know. I might be wrong or have had a wrong perception of the things there. Also, my English could be better.
terça-feira, 22 de dezembro de 2009
Delphi to .Net converters
Some tools I am keeping in my watch list to convert Delphi code to .Net:
Source: http://www.delphitodotnet.com/Articles/IsthereanautomatedwaytoconvertDelphitoCSharp.aspx
- Delphi2CS: http://www.netcoole.com/delphi2cs.htm
- TurnSharp: https://www.turnsharp.com/home.aspx
- Metex (consulting): http://www.metex.com/?gclid=CMnAueKs654CFaBb4wodsznuJg
Source: http://www.delphitodotnet.com/Articles/IsthereanautomatedwaytoconvertDelphitoCSharp.aspx
MS Tag tags
While trying to find the iPhone Bing app that is getting great reviews (e.g. PCMag, http://www.pcmag.com/article2/0,2817,2357334,00.asp) I have bumped into the MS Tag technology almost by accident since I have found a MS Tag iPhone app in the AppStore in the process.
MS Tag seems to be an interesting idea. I have known some similar technologies (3D bar codes) so I still don't get the real advantages of this one since 3D tags can be produced and read for free a long time ago. Maybe it is the integration with each mobile phone browser that MS will be providing for free.
MS tag allows people linking easily to web contents only by scanning (on phones) the image displayed on catalogs, wall advertisements, etc. This will avoid you having to take note of a link or having to type it later on in your browser. Typing by hand a link is cumbersome. Even short ones.
You login into the site (MSN credentials will work) and you can start creating your tags by providing a sentence and an URL to what you want to link to. After that the tag is listed on a grid. On the render grid column you can create several versions of the tag to embed in your site, publishing magazines, etc.
Tip: The first time you try to render, a different popup appears that forces you to read the publishing guidelines. After doing this for the first time, the next time you press render a popup menu with options to render the currently selected tag line apears: PDF, png, tiff, jpg, etc. are some options available.
For now the main thing in the publisher guidelines is that every user is required to provide instructions on how to get the reader software for the phones. The publisher guidelines state: "You must provide information on how to get the Tag Reader application (Go to gettag.mobi on your mobile browser)". I've tried it in the iPhone browser and... it works, detecting th mobile phone and directing you to the right place in the AppStore for downloading the app!
MS Tag seems to be an interesting idea. I have known some similar technologies (3D bar codes) so I still don't get the real advantages of this one since 3D tags can be produced and read for free a long time ago. Maybe it is the integration with each mobile phone browser that MS will be providing for free.
MS tag allows people linking easily to web contents only by scanning (on phones) the image displayed on catalogs, wall advertisements, etc. This will avoid you having to take note of a link or having to type it later on in your browser. Typing by hand a link is cumbersome. Even short ones.
You login into the site (MSN credentials will work) and you can start creating your tags by providing a sentence and an URL to what you want to link to. After that the tag is listed on a grid. On the render grid column you can create several versions of the tag to embed in your site, publishing magazines, etc.
Tip: The first time you try to render, a different popup appears that forces you to read the publishing guidelines. After doing this for the first time, the next time you press render a popup menu with options to render the currently selected tag line apears: PDF, png, tiff, jpg, etc. are some options available.
MS tagging publisher guidelines can be found at: http://www.microsoft.com/tag/content/why/guidelines.aspx
The bad news is that you'll have to pay for each generated coloured tag when the service goes off Beta.
Also, I've tried the above logo with the iPhone. Open the MS Tag app, photographed the logo on my laptop LCD, chose "Use" action and there you go: A browser page with this blog on the iPhone browser appeared. Nice and sweet and with no sweat!
Azure@Curia
Recently I was present at the Azure@Curia at the "WRC Curia".
Details of the event can be found at: http://events.linkedin.com/Azure-Curia/pub/179391
This was a special event for me mainly for personal reasons. My grandmother's house is 50 meters away from the place the event was and I was able to spot it through the Window of the facilities. The place were WRC was built was a long time ago a rich man's house and my grandmother's house was one of the two or three separated houses of the caretakers of a farm. By the way, a now closed guesthouse at Curia belonged to my other grandfathers, who lived nearby in their final years.
Regarding the event, I found it really interesting. The cloud is a powerful thing, enabling everyone, even small companies, to create products and sell them without having to bother with complex infra-structure partnerships, and so on. Deployment is immediate. Regarding the cloud I have some security concerns (data privacy) and backup concerns (remember the Sidekick recent loss of data) but things will be clearer as times goes by: privacy statements from M$, backup policies, etc.
Azure seems an interesting thing mainly for anyone who already masters the .Net platform. If you have follow some guidelines while developing, applications can be ported to the Cloud almost effortlessly. Applications can be developed to work online and offline if needed.
Interesting things I have never thought of were:
- Quality is even more important than ever. Now that you pay for bytes transferred to the DB and back, you don't want to have a development team that does not develop unit tests thoroughly and that deploys without running the suite of system tests against the product locally. More than ever, you have to fire that sloppy programmer of yours that made that infinite loop while reading from the Azure DB.
- There is a market for development of auxiliary tools that complement what MS is offering for managing the applications in the cloud. For instance, there is no way or configuration possible to be made to warn you when a certain amount of data was trasnferred to the cloud (eventually to warn you of a bug in the software you have deployed to prevent heavy charges in the end of the month).
- You can have a single application developed to the cloud, and have several customers using it in the very same database. Customization can be made by skinning the application along with the authenticated user. Interesting stuff no? So every time you fix a bug or improve your product and deploy it to the Cloud, you are in fact updating every customer of yours. No need to remote desktop everyone of them to install on their servers or to do the update at several ISPs to cover all of your customers sites. Again, extra care has to be put in the final stages, testing before deploying. But this is not something new. But I liked the mechanism of quickly being able to reverse a deployment in the cloud, just in case.
More about this will be coming, as soon as I remember it.
The agenda of the event was:
14h30 ‐ Cloud Computing: A plataforma Azure
Luís Alves Martins, Architect Advisor ‐ Microsoft
15h45 ‐ Armazenamento na Cloud
José António Silva – R&D Director ‐ Devscope
17h00 ‐ Windows Azure na prática
Luís Alves Martins/Carlos Fernandes
Details of the event can be found at: http://events.linkedin.com/Azure-Curia/pub/179391
This was a special event for me mainly for personal reasons. My grandmother's house is 50 meters away from the place the event was and I was able to spot it through the Window of the facilities. The place were WRC was built was a long time ago a rich man's house and my grandmother's house was one of the two or three separated houses of the caretakers of a farm. By the way, a now closed guesthouse at Curia belonged to my other grandfathers, who lived nearby in their final years.
Regarding the event, I found it really interesting. The cloud is a powerful thing, enabling everyone, even small companies, to create products and sell them without having to bother with complex infra-structure partnerships, and so on. Deployment is immediate. Regarding the cloud I have some security concerns (data privacy) and backup concerns (remember the Sidekick recent loss of data) but things will be clearer as times goes by: privacy statements from M$, backup policies, etc.
Azure seems an interesting thing mainly for anyone who already masters the .Net platform. If you have follow some guidelines while developing, applications can be ported to the Cloud almost effortlessly. Applications can be developed to work online and offline if needed.
Interesting things I have never thought of were:
- Quality is even more important than ever. Now that you pay for bytes transferred to the DB and back, you don't want to have a development team that does not develop unit tests thoroughly and that deploys without running the suite of system tests against the product locally. More than ever, you have to fire that sloppy programmer of yours that made that infinite loop while reading from the Azure DB.
- There is a market for development of auxiliary tools that complement what MS is offering for managing the applications in the cloud. For instance, there is no way or configuration possible to be made to warn you when a certain amount of data was trasnferred to the cloud (eventually to warn you of a bug in the software you have deployed to prevent heavy charges in the end of the month).
- You can have a single application developed to the cloud, and have several customers using it in the very same database. Customization can be made by skinning the application along with the authenticated user. Interesting stuff no? So every time you fix a bug or improve your product and deploy it to the Cloud, you are in fact updating every customer of yours. No need to remote desktop everyone of them to install on their servers or to do the update at several ISPs to cover all of your customers sites. Again, extra care has to be put in the final stages, testing before deploying. But this is not something new. But I liked the mechanism of quickly being able to reverse a deployment in the cloud, just in case.
More about this will be coming, as soon as I remember it.
The agenda of the event was:
14h30 ‐ Cloud Computing: A plataforma Azure
Luís Alves Martins, Architect Advisor ‐ Microsoft
15h45 ‐ Armazenamento na Cloud
José António Silva – R&D Director ‐ Devscope
17h00 ‐ Windows Azure na prática
Luís Alves Martins/Carlos Fernandes
sexta-feira, 20 de novembro de 2009
[TECH] Windows Tools Description
I am reproducing here some of the tools descriptions introduced in the previous post (*):
• Application Verifier is designed specifically to detect and help debug memory corruptions and critical security vulnerabilities.
This is achieved by monitoring a native application's interaction with the Windows operating system, profiling its use of objects, the registry, the file system, and Win32 APIs (including heaps, handles, locks, etc), and indicating issues when and where they are discovered.
Application Verifier also includes checks to predict how well an application may perform under various account privileges. These compatibility tests are used in Windows Logo program.
Print verification tests are also available to verify your usage of the print subsystem.
• Notmyfault: Use this executable and driver to crash your system in several different ways. Notmyfault can be used to demonstrate pool leak troubleshooting or for crash analysis examples. The download includes x86 (in the exe\release directory) and x64 versions (in the exe\relamd directory) as well as full source.
• Testlimit: Testlimit can be used to demonstrate the operating system's per-process limit on the number of concurrently opened handles, but the tool's command-line options also let you test limits of process and thread creation.
• VMMap is a process virtual and physical memory analysis utility. It shows a breakdown of a process's committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types. Besides graphical representations of memory usage, VMMap also shows summary information and a detailed process memory map. Powerful filtering and refresh capabilities allow you to identify the sources of process memory usage and the memory cost of application features.
• MemInfo is a tool to query information on the state of the memory manager page lists, page frame number (PFN) database entries, per-component and per-process memory usage, and for mapping virtual to physical addresses (for certain kinds of kernel-mode pointers). It can also display the physical memory ranges available for use by Windows and reported by the BIOS and/or ACPI tables. MemInfo can help detect bad or damaged memory sticks by displaying the size of the bad page list, as well as help in detecting certain kinds of malware or rootkits by showing processes that tools other than the kernel debugger may not show as present. It can also be used to diagnose certain situations where the number of memory available to Windows is different from the amount of memory installed on the system.
• Debugging tools for Windows Package: Allows to use Process Explorer to view both the currently allocated pool sizes, as well as the maximum. To see the maximum, you’ll need to configure Process Explorer to use symbol files for the operating system. First, install the latest Debugging Tools for Windows package. Then run Process Explorer and open the Symbol Configuration dialog in the Options menu and point it at the dbghelp.dll in the Debugging Tools for Windows installation directory and set the symbol path to point at Microsoft’s symbol server
• WinObj is a must-have tool if you are a system administrator concerned about security, a developer tracking down object-related problems, or just curious about the Object Manager namespace. WinObj is a 32-bit Windows NT program that uses the native Windows NT API (provided by NTDLL.DLL) to access and display information on the NT Object Manager's name space. Winobj may seem similar to the Microsoft SDK's program of the same name, but the SDK version suffers from numerous significant bugs that prevent it from displaying accurate information (e.g. its handle and reference counting information are totally broken). In addition, our WinObj understands many more object types. Finally, Version 2.0 of our WinObj has user-interface enhancements, knows how to open device objects, and will let you view and change object security information using native NT security editors.
(*) Sourced from the download links that were previously provided,
• Application Verifier is designed specifically to detect and help debug memory corruptions and critical security vulnerabilities.
This is achieved by monitoring a native application's interaction with the Windows operating system, profiling its use of objects, the registry, the file system, and Win32 APIs (including heaps, handles, locks, etc), and indicating issues when and where they are discovered.
Application Verifier also includes checks to predict how well an application may perform under various account privileges. These compatibility tests are used in Windows Logo program.
Print verification tests are also available to verify your usage of the print subsystem.
• Notmyfault: Use this executable and driver to crash your system in several different ways. Notmyfault can be used to demonstrate pool leak troubleshooting or for crash analysis examples. The download includes x86 (in the exe\release directory) and x64 versions (in the exe\relamd directory) as well as full source.
• Testlimit: Testlimit can be used to demonstrate the operating system's per-process limit on the number of concurrently opened handles, but the tool's command-line options also let you test limits of process and thread creation.
• VMMap is a process virtual and physical memory analysis utility. It shows a breakdown of a process's committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types. Besides graphical representations of memory usage, VMMap also shows summary information and a detailed process memory map. Powerful filtering and refresh capabilities allow you to identify the sources of process memory usage and the memory cost of application features.
• MemInfo is a tool to query information on the state of the memory manager page lists, page frame number (PFN) database entries, per-component and per-process memory usage, and for mapping virtual to physical addresses (for certain kinds of kernel-mode pointers). It can also display the physical memory ranges available for use by Windows and reported by the BIOS and/or ACPI tables. MemInfo can help detect bad or damaged memory sticks by displaying the size of the bad page list, as well as help in detecting certain kinds of malware or rootkits by showing processes that tools other than the kernel debugger may not show as present. It can also be used to diagnose certain situations where the number of memory available to Windows is different from the amount of memory installed on the system.
• Debugging tools for Windows Package: Allows to use Process Explorer to view both the currently allocated pool sizes, as well as the maximum. To see the maximum, you’ll need to configure Process Explorer to use symbol files for the operating system. First, install the latest Debugging Tools for Windows package. Then run Process Explorer and open the Symbol Configuration dialog in the Options menu and point it at the dbghelp.dll in the Debugging Tools for Windows installation directory and set the symbol path to point at Microsoft’s symbol server
• WinObj is a must-have tool if you are a system administrator concerned about security, a developer tracking down object-related problems, or just curious about the Object Manager namespace. WinObj is a 32-bit Windows NT program that uses the native Windows NT API (provided by NTDLL.DLL) to access and display information on the NT Object Manager's name space. Winobj may seem similar to the Microsoft SDK's program of the same name, but the SDK version suffers from numerous significant bugs that prevent it from displaying accurate information (e.g. its handle and reference counting information are totally broken). In addition, our WinObj understands many more object types. Finally, Version 2.0 of our WinObj has user-interface enhancements, knows how to open device objects, and will let you view and change object security information using native NT security editors.
(*) Sourced from the download links that were previously provided,
[TECH][PT] Windows Memory Management Tools
Here are some very useful tools for tracking Windows memory management issues and for analyzing and inspecting third party applications and what they are doing or using.
- Application Verifier: http://www.microsoft.com/downloads/details.aspx?FamilyID=c4a25ab9-649d-4a1b-b4a7-c9d8b095df18&DisplayLang=en#filelist (relevante para deteccção de leaks de aplicações Win32).
- Testlimit: http://download.sysinternals.com/Files/Testlimit.zip (particularmente relevante para provocar situações extremas de uso de Handles, Kernel Memory, etc).
- Application Verifier: http://www.microsoft.com/downloads/details.aspx?FamilyID=c4a25ab9-649d-4a1b-b4a7-c9d8b095df18&DisplayLang=en#filelist (relevante para deteccção de leaks de aplicações Win32).
- Testlimit: http://download.sysinternals.com/Files/Testlimit.zip (particularmente relevante para provocar situações extremas de uso de Handles, Kernel Memory, etc).
- Notmyfault: http://download.sysinternals.com/Files/Notmyfault.zip
- Debugging tools for Windows Package (pré-requisito para o LiveKD): http://www.microsoft.com/whdc/devtools/debugging/default.mspx ou http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx, instalada nos termos descritos no artigo [2];
- LiveKD: http://technet.microsoft.com/en-us/sysinternals/bb897415.aspx - apresenta num dos modos dados relacionados com Kernel memory, limites máximos, etc.
A seguinte ferramenta é referida nos artigos, pode ser usada para determinar kernel pool leaks (ver [2]) e, ao que parece, já se encontra instalada:
Outras ferramentas que podem ajudar:
- windbg (Windows debugger): http://www.microsoft.com/whdc/devtools/debugging/default.mspx (parte das Debugging Tools for Windows)
[TECH] Turbo Delphi - Free Delphi IDE
For Delphi lovers, there are free versions of the IDE for Win32, .Net and so on.
The only restriction is that you can't add custom components (like components from Developer Express).
If you want to make a simple Win32 application and you know Delphi / Object Pascal this is a good IDE for it. Just follow the link: Turbo Delphi jump start article
Note: I did not verify all the links on the target article yet.
The only restriction is that you can't add custom components (like components from Developer Express).
If you want to make a simple Win32 application and you know Delphi / Object Pascal this is a good IDE for it. Just follow the link: Turbo Delphi jump start article
Note: I did not verify all the links on the target article yet.
[TECH][WIN] Windows Memory Management great articles
Mark is a guy who can explain something complex in a very clear and simple way. I found these four articles on Windows memory management highly informative, now that I am in the process of solving a stability issue on a customer:
[3] http://blogs.technet.com/markrussinovich/archive/2008/07/21/3092070.aspx (Physical Memory - relevante para a questão de memória utilizada por devices apresentada nas properties do My Computer)
[4] http://blogs.technet.com/markrussinovich/archive/2009/07/08/3261309.aspx (Processes e Threads)
Also a reference in the area is the following book:
[TECH] Who stole who?
The common opinion with some people I know is that MS only copies others and that it is not so innovative as other companies.
This is an interesting article I found a few weeks ago and some of the discussions about these issues remind me of the discussion between who was born first: Was it the chicken or the egg? Because innovation is sometimes improving a concept that already exists. I think it is very difficult to enter a market without copying the others, I mean, improving on other's ideas. For instance look at what's happening to Apple because of the iPhone: it seems that Nokia is claiming a few copyright infringements.
Apple versus Microsoft: The top 20 stolen ideas of the OS wars:
So, who stole more from each other? Apple or Microsoft?
quarta-feira, 4 de novembro de 2009
Good Stuff?
Good stuff... Good stuff is what an English teacher of mine would say often during his classes. It is what comes into my mind when thinking of the tech world. So many things to think about, investigate, read, create an opinion, test, look and discover. You might even forget harsh reality and all its problems.
During my daily work I am confronted with some data sources, interesting stuff that I'd like to share to others. I like to receive bits of information daily instead of spending minutes browsing the web for updating myself. If something catches my eye I'll share and I'll be more than glad if some of you might find it of some help or for achieving that same purpose.
Nowadays I am a "certified English Speaker" and this means that I am qualified to speak more correct English (but not more than "native" speakers). All these statements are private jokes I used to tell to a customer that stayed on our facilities for years (AgustaWestland, Westland Helicopters) and with whom I worked closely. Nowadays I am starting to miss those times.
So let's keep the good stuff coming.
Good stuff!
Subscrever:
Mensagens (Atom)